Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Remove unnecessary handle clone in run closure

Richie McIlroy98e525c3cde5
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs
index d06a0a19b..dcc30d185 100644
--- a/apps/desktop/src-tauri/src/lib.rs
+++ b/apps/desktop/src-tauri/src/lib.rs
@@ -4780,10 +4780,9 @@ pub async fn run(recording_logging_handle: LoggingHandle, logs_dir: PathBuf) {
})
.build(tauri_context)
.expect("error while running tauri application")
- .run(move |_handle, event| {
- let handle = _handle.clone();
+ .run(move |handle, event| {
let result = std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| {
- handle_run_event(&handle, event);
+ handle_run_event(handle, event);
}));
if let Err(panic) = result {