mirror of
https://github.com/storytold/lightcraft.git
synced 2026-11-02 22:49:48 -06:00
Clippy 1.99: as_chunks for the Fill spot's completion (chunks_exact_to_as_chunks)
Rust 1.99's clippy rejects `chunks_exact(3)` with a constant size (`chunks_exact_to_as_chunks`, -D warnings), which failed `cargo xtask ci` on main. Same behaviour: the completed pixels are copied as [f32; 3]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
25ef65c81e
commit
3c50fd58e6
@@ -247,8 +247,8 @@ fn fill_box(src: &mut [[f32; 3]], tgt: &[[f32; 3]], alpha: &[f32], bw: usize, bh
|
||||
let flat: Vec<f32> = 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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user