summaryrefslogtreecommitdiff
path: root/cli/fmt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/fmt.rs')
-rw-r--r--cli/fmt.rs22
1 files changed, 4 insertions, 18 deletions
diff --git a/cli/fmt.rs b/cli/fmt.rs
index 8f1350973..4b51e038e 100644
--- a/cli/fmt.rs
+++ b/cli/fmt.rs
@@ -71,24 +71,10 @@ async fn check_source_files(
if formatted_text != file_text {
not_formatted_files_count.fetch_add(1, Ordering::Relaxed);
let _g = output_lock.lock().unwrap();
- match diff(&file_text, &formatted_text) {
- Ok(diff) => {
- info!("");
- info!(
- "{} {}:",
- colors::bold("from"),
- file_path.display().to_string()
- );
- info!("{}", diff);
- }
- Err(e) => {
- eprintln!(
- "Error generating diff: {}",
- file_path.to_string_lossy()
- );
- eprintln!(" {}", e);
- }
- }
+ let diff = diff(&file_text, &formatted_text);
+ info!("");
+ info!("{} {}:", colors::bold("from"), file_path.display());
+ info!("{}", diff);
}
}
Err(e) => {