Skip to content

Commit 5f536d6

Browse files
authored
Do not emit file name on stdin mode (#4225)
1 parent b552734 commit 5f536d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rustfmt/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ struct Opt {
131131

132132
impl Opt {
133133
fn verbosity(&self) -> Verbosity {
134-
if self.verbose {
135-
Verbosity::Verbose
136-
} else if self.quiet {
134+
if self.quiet || self.files.is_empty() {
137135
Verbosity::Quiet
136+
} else if self.verbose {
137+
Verbosity::Verbose
138138
} else {
139139
Verbosity::Normal
140140
}

0 commit comments

Comments
 (0)