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 <noreply@anthropic.com>
This commit is contained in:
Khuong Doan
2026-11-11 23:19:16 -05:00
committed by GitHub
co-authored by Claude Opus 5.5
parent c736e488ba
commit ca87680fb0
+1
View File
@@ -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);