From 01bd4672c189f1d03137e1d72c5496e61252d69f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 29 Apr 2026 07:12:29 +0000 Subject: [PATCH] refactor(tauri): drop redundant handle clone in start_watcher start_watcher takes handle: tauri::AppHandle by value, then immediately did let handle = handle.clone() before moving it into the file-watcher closure. The intermediate clone has no purpose: the parameter is unused outside the closure, so the move can take it directly. https://claude.ai/code/session_01Vk2NBZGFP3YVshDj1CwDjt --- apps/tauri/src-tauri/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/tauri/src-tauri/src/lib.rs b/apps/tauri/src-tauri/src/lib.rs index eae1c25..a15ecbb 100644 --- a/apps/tauri/src-tauri/src/lib.rs +++ b/apps/tauri/src-tauri/src/lib.rs @@ -1203,7 +1203,6 @@ fn start_watcher(handle: tauri::AppHandle, path: PathBuf) { if let Ok(mut w) = WATCHER.lock() { *w = None; } - let handle = handle.clone(); let debouncer = new_debouncer( std::time::Duration::from_millis(500), move |events: Result, notify::Error>| {