From 391230adf47d9d20f4b1d80351a30e9dcc25214d Mon Sep 17 00:00:00 2001 From: morde Date: Thu, 13 Jun 2024 14:41:36 +0300 Subject: [PATCH] chore: clippy --- src/handlers/erase_handler.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/handlers/erase_handler.rs b/src/handlers/erase_handler.rs index 0bae451..0cde115 100644 --- a/src/handlers/erase_handler.rs +++ b/src/handlers/erase_handler.rs @@ -8,10 +8,9 @@ pub async fn start(config: Config) -> Result<()> { let downloads = directories::get_downloads_directory(&config).await?; let installation_dir = directories::get_installation_directory(&config).await?; - if config.installation_location.is_none() { - if fs::remove_dir_all(&installation_dir).await.is_ok() { - info!("Successfully removed neovim's installation folder"); - } + if config.installation_location.is_none() && fs::remove_dir_all(&installation_dir).await.is_ok() + { + info!("Successfully removed neovim's installation folder"); } if fs::remove_dir_all(downloads).await.is_ok() { // For some weird reason this check doesn't really work for downloads folder