From b44b42fc1ac076a2a1fa28ebcf4e63d2c76c37e4 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Mon, 31 Jan 2022 01:54:14 +0000 Subject: [PATCH] Follow suggestion as shown here -> https://rust-lang.github.io/rust-clippy/master/index.html#single_match --- src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index d6ac0e1..e41ce0c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -111,7 +111,7 @@ fn main() { set_hook(Box::new(|info| clap_panic!(info))); let matches = app!().get_matches(); - match UwUify::new( + if let Err(err) = UwUify::new( matches.value_of("text"), matches.value_of("infile"), matches.value_of("outfile"), @@ -128,9 +128,8 @@ fn main() { ) .uwuify() { - Err(err) => clap_panic!(err), - _ => {} - }; + clap_panic!(err); + } } fn is_between_zero_and_one(input: &str) -> Result<(), &'static str> {