From ca87680fb0f9d7803d3e64c808d0a3f7a196fdaa Mon Sep 17 00:00:00 2001 From: Khuong Doan <108074836+2ez4gcx@users.noreply.github.com> Date: Thu, 12 Nov 2026 11:19:16 +0700 Subject: [PATCH] xtask: clippy passes on Windows again (#3091) stats.rs's test helper fresh_dir mutates its DirBuilder only on Unix (DirBuilderExt::mode), so on Windows `cargo clippy --workspace --all-targets -- -D warnings`, and with it `cargo xtask ci`, fails with unused_mut. Allow that lint off Unix on that binding. Co-authored-by: Claude Opus 5.5 --- xtask/src/stats.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/xtask/src/stats.rs b/xtask/src/stats.rs index 790f68b50..023faf9ee 100644 --- a/xtask/src/stats.rs +++ b/xtask/src/stats.rs @@ -141,6 +141,7 @@ mod tests { fn fresh_dir(tag: &str) -> std::path::PathBuf { let nanos = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).map_or(0, |d| d.as_nanos()); let p = std::env::temp_dir().join(format!("cadcraft-{tag}-{}-{nanos}", std::process::id())); + #[cfg_attr(not(unix), allow(unused_mut))] let mut b = std::fs::DirBuilder::new(); #[cfg(unix)] std::os::unix::fs::DirBuilderExt::mode(&mut b, 0o700);