summaryrefslogtreecommitdiff
path: root/cli/tools/fmt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tools/fmt.rs')
-rw-r--r--cli/tools/fmt.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/tools/fmt.rs b/cli/tools/fmt.rs
index b16639f99..ef3d48cb5 100644
--- a/cli/tools/fmt.rs
+++ b/cli/tools/fmt.rs
@@ -396,8 +396,8 @@ async fn format_source_files(
}
Err(e) => {
let _g = output_lock.lock();
- eprintln!("Error formatting: {}", file_path.to_string_lossy());
- eprintln!(" {e}");
+ log::error!("Error formatting: {}", file_path.to_string_lossy());
+ log::error!(" {e}");
}
}
Ok(())
@@ -495,6 +495,7 @@ fn format_stdin(fmt_options: FmtOptions, ext: &str) -> Result<(), AnyError> {
let file_path = PathBuf::from(format!("_stdin.{ext}"));
let formatted_text = format_file(&file_path, &source, &fmt_options.options)?;
if fmt_options.check {
+ #[allow(clippy::print_stdout)]
if formatted_text.is_some() {
println!("Not formatted stdin");
}