Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix(lint): rename unchecked_duration_subtraction to unchecked_time_subtraction
Richie McIlroy4642b5a20cf7
diff --git a/AGENTS.md b/AGENTS.mdindex c73653976..960e30833 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -31,7 +31,7 @@ All Rust code must respect these workspace-level lints defined in `Cargo.toml`:**Clippy lints (all denied):**- `dbg_macro` — Never use `dbg!()` in code; use proper logging instead.- `let_underscore_future` — Never write `let _ = async_fn()` which silently drops futures; await or explicitly handle them.-- `unchecked_duration_subtraction` — Use `saturating_sub` instead of `-` for `Duration` to avoid panics.+- `unchecked_time_subtraction` — Use `saturating_sub` instead of `-` for `Duration` to avoid panics.- `collapsible_if` — Merge nested `if` statements: use `if a && b { }` instead of `if a { if b { } }`.- `clone_on_copy` — Don't call `.clone()` on `Copy` types; just copy them directly.- `redundant_closure` — Use function references directly: `iter.map(foo)` instead of `iter.map(|x| foo(x))`.diff --git a/CLAUDE.md b/CLAUDE.mdindex c6279ee04..de7026dd3 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -380,7 +380,7 @@ All Rust code must respect these workspace-level lints defined in `Cargo.toml`.**Clippy lints (all denied — code MUST NOT contain these patterns):**- `dbg_macro` — Never use `dbg!()` in code; use proper logging (`tracing::debug!`, etc.) instead.- `let_underscore_future` — Never write `let _ = async_fn()` which silently drops futures; await or explicitly handle them.-- `unchecked_duration_subtraction` — Use `duration.saturating_sub(other)` instead of `duration - other` to avoid panics on underflow.+- `unchecked_time_subtraction` — Use `duration.saturating_sub(other)` instead of `duration - other` to avoid panics on underflow.- `collapsible_if` — Merge nested `if` statements: write `if a && b { }` instead of `if a { if b { } }`.- `clone_on_copy` — Don't call `.clone()` on `Copy` types (integers, bools, etc.); just copy them directly.- `redundant_closure` — Use function references directly: `iter.map(foo)` instead of `iter.map(|x| foo(x))`.diff --git a/Cargo.toml b/Cargo.tomlindex f39d35f4c..44097ca75 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -83,7 +83,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/crates/audio/src/latency.rs b/crates/audio/src/latency.rsindex ea0874f22..364c5d3fa 100644--- a/crates/audio/src/latency.rs+++ b/crates/audio/src/latency.rs@@ -945,7 +945,7 @@ mod windows {}#[cfg(test)]-#[allow(clippy::unchecked_duration_subtraction)]+#[allow(clippy::unchecked_time_subtraction)]mod tests {use super::*;use std::time::Instant;