From 9ae3b365a1ba2de3e0511b229bbf1ddd0f8cc14a Mon Sep 17 00:00:00 2001 From: ChippedW <263910329+ChippedW@users.noreply.github.com> Date: Mon, 12 Oct 2026 04:26:35 +0200 Subject: [PATCH] Windows / clippy 1.98: as_chunks in the spot fill, unix-only lock test helper `cargo xtask ci` failed at clippy on Windows with Rust 1.98.1 before any feature work: - crates/pipeline/src/spots.rs: clippy::chunks_exact_to_as_chunks (new lint); `as_chunks::<3>()` is what crates/codecs already uses, same behaviour, no indexing. - crates/catalog/src/lock.rs: `descriptor_copy` is only used by a `#[cfg(unix)]` test, so it was dead code in Windows test builds. Co-Authored-By: Claude Opus 5.5 --- crates/catalog/src/lock.rs | 4 ++-- crates/pipeline/src/spots.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/catalog/src/lock.rs b/crates/catalog/src/lock.rs index 8a2b496d6..c53e8178b 100644 --- a/crates/catalog/src/lock.rs +++ b/crates/catalog/src/lock.rs @@ -135,8 +135,8 @@ impl LibraryLock { } /// Another descriptor on the locked file: what a process spawned by another thread holds - /// between fork and exec (a `dup` refers to the same open file description). Tests only. - #[cfg(test)] + /// between fork and exec (a `dup` refers to the same open file description). Unix tests only. + #[cfg(all(test, unix))] pub(crate) fn descriptor_copy(&self) -> Option { self.file.as_ref().and_then(|f| f.try_clone().ok()) } diff --git a/crates/pipeline/src/spots.rs b/crates/pipeline/src/spots.rs index 483f83f3c..f8b3fbbdf 100644 --- a/crates/pipeline/src/spots.rs +++ b/crates/pipeline/src/spots.rs @@ -247,8 +247,8 @@ fn fill_box(src: &mut [[f32; 3]], tgt: &[[f32; 3]], alpha: &[f32], bw: usize, bh let flat: Vec = tgt.iter().flatten().copied().collect(); let out = lightcraft_inpaint::complete(bw, bh, 3, &flat, &hole, &lightcraft_inpaint::CompleteParams::default()) .unwrap_or_else(|| lightcraft_inpaint::membrane_fill(bw, bh, 3, &flat, &hole)); - for (d, v) in src.iter_mut().zip(out.chunks_exact(3)) { - *d = [v[0], v[1], v[2]]; + for (d, v) in src.iter_mut().zip(out.as_chunks::<3>().0) { + *d = *v; } }