From cf9662226131a5dd2500e381db76d4c13fd4ac34 Mon Sep 17 00:00:00 2001 From: GyDi Date: Mon, 12 Sep 2022 00:02:25 +0800 Subject: [PATCH] fix: unused --- src-tauri/src/core/service.rs | 2 +- src-tauri/src/main.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src-tauri/src/core/service.rs b/src-tauri/src/core/service.rs index b6f053d..ac26d86 100644 --- a/src-tauri/src/core/service.rs +++ b/src-tauri/src/core/service.rs @@ -182,9 +182,9 @@ impl Service { } pub fn check_start(&mut self) -> Result<()> { - let global = Data::global(); #[cfg(target_os = "windows")] { + let global = Data::global(); let verge = global.verge.lock(); let service_mode = verge.enable_service_mode.unwrap_or(false); diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index e8cdb61..0d0c04f 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -190,7 +190,8 @@ fn main() -> std::io::Result<()> { }) .expect("error when exiting."); - app.run(|_, e| match e { + #[allow(unused)] + app.run(|app_handle, e| match e { tauri::RunEvent::ExitRequested { api, .. } => { api.prevent_exit(); }