diff --git a/src/main.rs b/src/main.rs index cdd6e91..b59cab8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -268,13 +268,11 @@ fn main() { let _ = ansi_term::enable_ansi_support(); let result = run(); - match result { - Err(err) => { - // The whitespace is being removed from the right because - // clap errors add a newline to the end of the output already - eprintln!("Error: {}", format!("{}", err).trim_right()); - std::process::exit(1); - } - Ok(()) => {} + + if let Err(err) = result { + // The whitespace is being removed from the right because + // clap errors add a newline to the end of the output already + eprintln!("Error: {}", format!("{}", err).trim_right()); + std::process::exit(1); } }