1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-11 00:21:05 -05:00

fix clippy (#4875)

This commit is contained in:
Ryan Dahl 2020-04-24 05:14:18 -04:00 committed by GitHub
parent f952d69eec
commit 0da042c6fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ async fn check_source_files(
} }
} }
Err(e) => { Err(e) => {
let _ = output_lock.lock().unwrap(); let _g = output_lock.lock().unwrap();
eprintln!("Error checking: {}", &file_path_str); eprintln!("Error checking: {}", &file_path_str);
eprintln!(" {}", e); eprintln!(" {}", e);
} }
@ -108,12 +108,12 @@ async fn format_source_files(
if formatted_text != file_contents { if formatted_text != file_contents {
fs::write(&file_path, formatted_text)?; fs::write(&file_path, formatted_text)?;
formatted_files_count.fetch_add(1, Ordering::SeqCst); formatted_files_count.fetch_add(1, Ordering::SeqCst);
let _ = output_lock.lock().unwrap(); let _g = output_lock.lock().unwrap();
println!("{}", file_path_str); println!("{}", file_path_str);
} }
} }
Err(e) => { Err(e) => {
let _ = output_lock.lock().unwrap(); let _g = output_lock.lock().unwrap();
eprintln!("Error formatting: {}", &file_path_str); eprintln!("Error formatting: {}", &file_path_str);
eprintln!(" {}", e); eprintln!(" {}", e);
} }