From 0da042c6fe067996e09f5c544502534b14b48713 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Fri, 24 Apr 2020 05:14:18 -0400 Subject: [PATCH] fix clippy (#4875) --- cli/fmt.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/fmt.rs b/cli/fmt.rs index 03b7903fe1..b371c8f9f1 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); }