From 2801199bea24df5955475424d0595533701b0b36 Mon Sep 17 00:00:00 2001 From: Alfons Hoogervorst <92640+snofla@users.noreply.github.com> Date: Sun, 11 Oct 2026 16:56:59 +0200 Subject: [PATCH] Issue #989: fill_box reads its buffer with as_chunks::<3>() (clippy 1.99 chunks_exact_to_as_chunks) Item 4 of #989. Same elements and the same ignored remainder as chunks_exact(3), checked on lengths 0-9 in a scratch file; the 13 spots tests pass and clippy over the workspace without the desktop app package is clean under -D warnings. Items 1-3 of #989 (the macOS app build, the /bin/true lock test, eleven engine tests) are not touched here. Co-Authored-By: Claude Sonnet 5.5 --- crates/pipeline/src/spots.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/pipeline/src/spots.rs b/crates/pipeline/src/spots.rs index 483f83f3..3bb775df 100644 --- a/crates/pipeline/src/spots.rs +++ b/crates/pipeline/src/spots.rs @@ -247,8 +247,9 @@ 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]]; + let (pixels, _) = out.as_chunks::<3>(); + for (d, v) in src.iter_mut().zip(pixels) { + *d = *v; } }