refactor: unify and simplify the call of app_handle

This commit is contained in:
huzibaca
2024-09-23 16:31:58 +08:00
parent 3d6faecaed
commit 1c894f3cfa
10 changed files with 135 additions and 158 deletions

View File

@@ -14,8 +14,8 @@ type CmdResult<T = ()> = Result<T, String>;
use tauri::Manager;
#[tauri::command]
pub fn copy_clash_env(app_handle: tauri::AppHandle) -> CmdResult {
feat::copy_clash_env(&app_handle);
pub fn copy_clash_env() -> CmdResult {
feat::copy_clash_env();
Ok(())
}