M14.4: as_chunks for the pixel loops main gained since the no-panics branch

Same treatment as the branch's `as_chunks` commit (Rust 1.99's
`chunks_exact_to_as_chunks` lint) for the flattener's coverage pass, the
CMYK ink compositor, the Flattener Preview highlight and four test helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-05 06:40:34 +07:00
co-authored by Claude Opus 5.5
parent 1a5f7f6441
commit 7fb07bb3db
7 changed files with 26 additions and 7 deletions
+1 -1
View File
@@ -219,7 +219,7 @@ fn every_builtin_style_paints_visibly_on_a_rectangle() {
run(&mut s, "graphicStyle.addFromLibrary", json!({"library": b.id, "name": g.name, "apply": true}));
assert_eq!(doc(&s).node(id).unwrap().graphic_style, doc(&s).graphic_style(&g.name).map(|x| x.id), "{}", g.name);
let img = renderer.render_region(doc(&s), Rect::new(0.0, 0.0, 100.0, 100.0), 0.5, true);
let painted = img.pixels.chunks_exact(4).filter(|p| p[..3] != [255, 255, 255]).count();
let painted = img.pixels.as_chunks::<4>().0.iter().filter(|p| p[..3] != [255, 255, 255]).count();
assert!(painted > 40, "{} / {} paints {painted} pixels", b.id, g.name);
}
}