diff --git a/src-tauri/src/notification_manager.rs b/src-tauri/src/notification_manager.rs index c809be0cb..f12595e2b 100644 --- a/src-tauri/src/notification_manager.rs +++ b/src-tauri/src/notification_manager.rs @@ -22,12 +22,14 @@ impl NotificationManager { match PlatformUtils::detect_current_os() { CurrentOperatingSystem::Linux => { #[cfg(target_os = "linux")] - let handle = notification.show().inspect_err( - |e| warn!(target: LOG_TARGET, "Failed to show notification: {:?}", e), - )?; - handle.on_close(|notification| { - info!(target: LOG_TARGET, "Notification closed: {:?}", notification); - }); + { + let handle = notification.show().inspect_err( + |e| warn!(target: LOG_TARGET, "Failed to show notification: {:?}", e), + )?; + handle.on_close(|notification| { + info!(target: LOG_TARGET, "Notification closed: {:?}", notification); + }); + } Ok(()) } CurrentOperatingSystem::MacOS => {