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
This commit is contained in:
Claude 2026-04-29 07:12:29 +00:00
parent 6c0d7257df
commit 01bd4672c1
No known key found for this signature in database

View file

@ -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<Vec<notify_debouncer_mini::DebouncedEvent>, notify::Error>| {