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?", );