From a5985c80bc6391f438eccf0839e98aeb39742121 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 24 Dec 2025 01:35:56 +0000 Subject: [PATCH] Fix: Update clippy lint and improve error handling Co-authored-by: richiemcilroy1 --- Cargo.toml | 2 +- apps/desktop/src-tauri/src/lib.rs | 8 ++++---- crates/audio/src/latency.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 61e8ab20f9..deb8763004 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,7 +81,7 @@ unused_must_use = "deny" [workspace.lints.clippy] dbg_macro = "deny" let_underscore_future = "deny" -unchecked_duration_subtraction = "deny" +unchecked_time_subtraction = "deny" collapsible_if = "deny" clone_on_copy = "deny" redundant_closure = "deny" diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs index 2bc1daa89d..b1262b05e6 100644 --- a/apps/desktop/src-tauri/src/lib.rs +++ b/apps/desktop/src-tauri/src/lib.rs @@ -124,10 +124,10 @@ impl FinalizingRecordings { pub fn finish_finalizing(&self, path: &Path) { let mut recordings = self.recordings.lock().unwrap(); - if let Some((tx, _)) = recordings.remove(path) { - if tx.send(true).is_err() { - debug!("Finalizing receiver dropped for path: {:?}", path); - } + if let Some((tx, _)) = recordings.remove(path) + && tx.send(true).is_err() + { + debug!("Finalizing receiver dropped for path: {:?}", path); } } diff --git a/crates/audio/src/latency.rs b/crates/audio/src/latency.rs index c948e57e51..ab3f8d18d1 100644 --- a/crates/audio/src/latency.rs +++ b/crates/audio/src/latency.rs @@ -615,7 +615,7 @@ mod macos { } #[cfg(test)] -#[allow(clippy::unchecked_duration_subtraction)] +#[allow(clippy::unchecked_time_subtraction)] mod tests { use super::*; use std::time::Instant;