From 831bd7e91d1f97f565d6ea15d816e638a983ad00 Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 1 Nov 2021 22:34:22 -0400 Subject: apply clippy lints --- bin/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'bin/src/main.rs') diff --git a/bin/src/main.rs b/bin/src/main.rs index 31f6823..4090701 100644 --- a/bin/src/main.rs +++ b/bin/src/main.rs @@ -71,7 +71,7 @@ fn _main() -> Result<(), StatixErr> { let single_fix_result = fix::single(line, col, &src)?; if single_config.diff_only { let text_diff = TextDiff::from_lines(src.as_str(), &single_fix_result.src); - let old_file = format!("{}", path_id); + let old_file = path_id.to_string(); let new_file = format!("{} [fixed]", path_id); println!( "{}", @@ -96,8 +96,7 @@ fn _main() -> Result<(), StatixErr> { } fn main() { - match _main() { - Err(e) => eprintln!("{}", e), - _ => (), + if let Err(e) = _main() { + eprintln!("{}", e); } } -- cgit v1.2.3