From 6e6796bf4ef1b53b9aba90b74761ed2f671b078d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20M=2E=20Bezerra?= Date: Sat, 15 Oct 2022 22:19:30 -0300 Subject: [PATCH] fix clippy warnings --- src/commands/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 474ea89..a658103 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -186,13 +186,13 @@ pub fn run( // // if deleting fails, print an extra alert message pointing // out that we left a possibly CORRUPTED file at `output_path` - if let Err(_) = utils::remove_file_or_dir(&output_path) { + if utils::remove_file_or_dir(&output_path).is_err() { eprintln!("{red}FATAL ERROR:\n", red = *colors::RED); eprintln!(" Ouch failed to delete the file '{}'.", to_utf(&output_path)); eprintln!(" Please delete it manually."); eprintln!(" This file is corrupted if compression didn't finished."); - if let Err(_) = compress_result { + if compress_result.is_err() { eprintln!(" Compression failed for reasons below."); } }