From 87938abb64f52212fe5ae9bcc7d14d6a8008e1ec Mon Sep 17 00:00:00 2001 From: t8y2 <1156263951@qq.com> Date: Thu, 25 Jun 2026 21:38:27 +0800 Subject: [PATCH] fix: suppress unused variable warnings in tray icon theme --- src-tauri/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 4ed76241ab..97ccb365de 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -163,19 +163,19 @@ fn apply_desktop_icon_theme(app: &tauri::AppHandle, icon_theme: DesktopIconTheme Ok(()) } -fn apply_desktop_tray_icon_theme(app: &tauri::AppHandle, icon_theme: DesktopIconTheme) -> tauri::Result<()> { - if let Some(tray) = app.tray_by_id(DESKTOP_TRAY_ID) { +fn apply_desktop_tray_icon_theme(app: &tauri::AppHandle, _icon_theme: DesktopIconTheme) -> tauri::Result<()> { + if let Some(_tray) = app.tray_by_id(DESKTOP_TRAY_ID) { #[cfg(target_os = "windows")] { - let icon = match icon_theme { + let icon = match _icon_theme { DesktopIconTheme::Default => app.default_window_icon().cloned(), DesktopIconTheme::Black => Some(BLACK_APP_ICON), }; - tray.set_icon(icon)?; + _tray.set_icon(icon)?; } #[cfg(not(any(target_os = "macos", target_os = "windows")))] { - let _ = (tray, icon_theme); + let _ = (_tray, _icon_theme); } } Ok(())