Kaynağa Gözat

fix: unused

GyDi 2 yıl önce
ebeveyn
işleme
cf96622261
2 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 1 1
      src-tauri/src/core/service.rs
  2. 2 1
      src-tauri/src/main.rs

+ 1 - 1
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);
 

+ 2 - 1
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();
     }