From 4e6b15ccfaa42c32406368a5052ff14d1a9387e0 Mon Sep 17 00:00:00 2001 From: Harold Hunt Date: Sat, 26 Sep 2026 21:58:34 -0400 Subject: [PATCH] fix: allow platform-specific CPU sampler fallback lints --- crates/disktree-core/src/scan_threads.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/disktree-core/src/scan_threads.rs b/crates/disktree-core/src/scan_threads.rs index ece9850..f285b8a 100644 --- a/crates/disktree-core/src/scan_threads.rs +++ b/crates/disktree-core/src/scan_threads.rs @@ -430,6 +430,14 @@ struct CpuSampler { system: sysinfo::System, } +#[cfg_attr( + not(any(target_os = "macos", target_os = "linux")), + allow( + clippy::missing_const_for_fn, + clippy::unused_self, + reason = "The fallback mirrors the stateful, non-const native API." + ) +)] impl CpuSampler { fn new() -> Self { #[cfg(any(target_os = "macos", target_os = "linux"))]