From d412340d6c261f14637e550caa93570ad4a99f97 Mon Sep 17 00:00:00 2001 From: lanyeeee Date: Wed, 9 Jul 2025 05:28:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=A0=E4=B8=BA?= =?UTF-8?q?=E5=AE=8F=E5=AF=BC=E8=87=B4=E7=9A=84IDE=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E7=BC=93=E6=85=A2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 82e63a4..49dc9e9 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -7,6 +7,10 @@ fn greet(name: &str) -> String { format!("Hello, {}! You've been greeted from Rust!", name) } +fn generate_context() -> tauri::Context { + tauri::generate_context!() +} + #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { let builder = tauri_specta::Builder::::new() @@ -27,6 +31,6 @@ pub fn run() { tauri::Builder::default() .plugin(tauri_plugin_opener::init()) .invoke_handler(builder.invoke_handler()) - .run(tauri::generate_context!()) + .run(generate_context()) .expect("error while running tauri application"); }