summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-04-24 05:14:18 -0400
committerGitHub <noreply@github.com>2020-04-24 11:14:18 +0200
commit0da042c6fe067996e09f5c544502534b14b48713 (patch)
treee9cc2e4c47a2904eedff3158fe78a7f7e891dbe4
parentf952d69eec957fcbefefd26220232fee6effe3e0 (diff)
fix clippy (#4875)
-rw-r--r--cli/fmt.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/fmt.rs b/cli/fmt.rs
index 03b7903fe..b371c8f9f 100644
--- a/cli/fmt.rs
+++ b/cli/fmt.rs
@@ -55,7 +55,7 @@ async fn check_source_files(
}
}
Err(e) => {
- let _ = output_lock.lock().unwrap();
+ let _g = output_lock.lock().unwrap();
eprintln!("Error checking: {}", &file_path_str);
eprintln!(" {}", e);
}
@@ -108,12 +108,12 @@ async fn format_source_files(
if formatted_text != file_contents {
fs::write(&file_path, formatted_text)?;
formatted_files_count.fetch_add(1, Ordering::SeqCst);
- let _ = output_lock.lock().unwrap();
+ let _g = output_lock.lock().unwrap();
println!("{}", file_path_str);
}
}
Err(e) => {
- let _ = output_lock.lock().unwrap();
+ let _g = output_lock.lock().unwrap();
eprintln!("Error formatting: {}", &file_path_str);
eprintln!(" {}", e);
}