From 3943823aa13b04b6f292610ac0819640f2b3de2f Mon Sep 17 00:00:00 2001 From: Kate Date: Mon, 3 Nov 2025 13:19:22 +0100 Subject: [PATCH] fix clippy 2 --- crates/auto_update/src/auto_update.rs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/crates/auto_update/src/auto_update.rs b/crates/auto_update/src/auto_update.rs index c7480738a0536476ce555487604970ee59afc9ca..c727a94c2d5718d42d29a3158552836868a4ace5 100644 --- a/crates/auto_update/src/auto_update.rs +++ b/crates/auto_update/src/auto_update.rs @@ -24,7 +24,6 @@ use std::{ sync::Arc, time::Duration, }; -use util::ResultExt; use workspace::Workspace; const SHOULD_SHOW_UPDATE_NOTIFICATION_KEY: &str = "auto-updater-should-show-updated-notification"; @@ -333,10 +332,14 @@ impl AutoUpdater { pub fn start_polling(&self, cx: &mut Context) -> Task> { cx.spawn(async move |this, cx| { #[cfg(target_os = "windows")] - cleanup_windows() - .await - .context("failed to cleanup old directories") - .log_err(); + { + use util::ResultExt; + + cleanup_windows() + .await + .context("failed to cleanup old directories") + .log_err(); + } loop { this.update(cx, |this, cx| this.poll(UpdateCheckType::Automatic, cx))?; @@ -932,6 +935,8 @@ async fn install_release_macos( #[cfg(target_os = "windows")] async fn cleanup_windows() -> Result<()> { + use util::ResultExt; + let parent = std::env::current_exe()? .parent() .context("No parent dir for Zed.exe")?