From 8efbf9e7fd6a85355839430ad8d1b61e48889c72 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Thu, 21 May 2026 12:48:48 +0800 Subject: [PATCH] fix: clippy errors for rust 1.97 --- src-tauri/src/config/profiles.rs | 2 +- src-tauri/src/core/tray/mod.rs | 2 +- src-tauri/src/utils/tray_speed.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/config/profiles.rs b/src-tauri/src/config/profiles.rs index 9592cf848..c98dc4b4d 100644 --- a/src-tauri/src/config/profiles.rs +++ b/src-tauri/src/config/profiles.rs @@ -238,7 +238,7 @@ impl IProfiles { if let Some(file_data) = item.file_data.take() { let file = each.file.take(); let file = - file.unwrap_or_else(|| item.file.take().unwrap_or_else(|| format!("{}.yaml", &uid).into())); + file.unwrap_or_else(|| item.file.take().unwrap_or_else(|| format!("{}.yaml", uid).into())); // the file must exists each.file = Some(file.clone()); diff --git a/src-tauri/src/core/tray/mod.rs b/src-tauri/src/core/tray/mod.rs index 3ab9761fc..fcde700c9 100644 --- a/src-tauri/src/core/tray/mod.rs +++ b/src-tauri/src/core/tray/mod.rs @@ -792,7 +792,7 @@ async fn create_tray_menu( let app_version = &MenuItem::with_id( app_handle, MenuIds::VERGE_VERSION, - format!("{} {version}", &texts.verge_version), + format!("{} {version}", texts.verge_version), true, None::<&str>, )?; diff --git a/src-tauri/src/utils/tray_speed.rs b/src-tauri/src/utils/tray_speed.rs index 364a6458b..77c363199 100644 --- a/src-tauri/src/utils/tray_speed.rs +++ b/src-tauri/src/utils/tray_speed.rs @@ -11,7 +11,7 @@ use objc2::MainThreadMarker; use objc2::rc::Retained; use objc2::runtime::AnyObject; use objc2_app_kit::{ - NSAttributedStringNSStringDrawing, NSBaselineOffsetAttributeName, NSColor, NSFont, NSFontAttributeName, + NSAttributedStringNSStringDrawing as _, NSBaselineOffsetAttributeName, NSColor, NSFont, NSFontAttributeName, NSFontWeightRegular, NSForegroundColorAttributeName, NSLineBreakMode, NSMutableParagraphStyle, NSParagraphStyleAttributeName, NSStatusBarButton, NSStatusItem, NSTextAlignment, };