Skip to content

Commit 4ef6a83

Browse files
committed
Fix test
1 parent 5ef89e6 commit 4ef6a83

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

rustfmt-core/rustfmt-bin/src/bin/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,11 @@ fn format(opt: Opt) -> Result<i32> {
520520
);
521521
}
522522

523-
let has_diff = emit_format_report(format_report, &mut stdout(), opt.emitter_config(EmitMode::Files))?;
523+
let has_diff = emit_format_report(
524+
format_report,
525+
&mut stdout(),
526+
opt.emitter_config(EmitMode::Files),
527+
)?;
524528

525529
Ok(if opt.check && has_diff { 1 } else { 0 })
526530
}

rustfmt-core/rustfmt-lib/src/test/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ fn check_files(files: Vec<PathBuf>, opt_config: &Option<PathBuf>) -> (Vec<Format
540540
debug!("Testing '{}'...", file_name.display());
541541

542542
match idempotent_check(&file_name, &opt_config) {
543-
Ok(ref report) if report.has_warnings() => {
543+
Ok(ref report) if report.has_errors() => {
544544
print!("{}", FormatReportFormatterBuilder::new(&report).build());
545545
fails += 1;
546546
}

0 commit comments

Comments
 (0)