From eb3fcf39450e82e6c23051010f057521c7214e29 Mon Sep 17 00:00:00 2001 From: Fries Date: Wed, 14 Sep 2022 15:58:02 -0700 Subject: [PATCH] amethyst: follow the paperclip (clippys) advice --- src/builder/paccache.rs | 2 +- src/operations/clean.rs | 2 +- src/operations/upgrade.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/builder/paccache.rs b/src/builder/paccache.rs index 884e45d..52cdf7f 100644 --- a/src/builder/paccache.rs +++ b/src/builder/paccache.rs @@ -39,7 +39,7 @@ impl PaccacheBuilder { } command - .args(&["-r", &format!("-k{}", self.keep.to_string())]) + .args(&["-r", &format!("-k{}", self.keep)]) .wait_success() .await } diff --git a/src/operations/clean.rs b/src/operations/clean.rs index 2da8144..2c5f92f 100644 --- a/src/operations/clean.rs +++ b/src/operations/clean.rs @@ -57,7 +57,7 @@ pub async fn clean(options: Options) { .uninstall() .await; - if let Err(_) = result { + if result.is_err() { crash!(AppExitCode::PacmanError, "Failed to remove orphans"); } else { tracing::info!("Successfully removed orphans"); diff --git a/src/operations/upgrade.rs b/src/operations/upgrade.rs index 433c5ba..3383352 100644 --- a/src/operations/upgrade.rs +++ b/src/operations/upgrade.rs @@ -33,7 +33,7 @@ async fn upgrade_repo(options: Options) { .upgrade() .await; - if let Err(_) = result { + if result.is_err() { let continue_upgrading = prompt!(default no, "Failed to upgrade repo packages, continue to upgrading AUR packages?", );