io/affinity: as_chunks for the mask's grey extraction (clippy 1.99)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UHgFEHEsefoQoBParH47JA
This commit is contained in:
Claude committed 2026-10-09 10:19:17 +00:00
1 parent 30aa0f974f
commit 20275685b1
1 file changed
+1 -1
+1 -1
View File
@@ -524,7 +524,7 @@ impl Builder {
fn mask(&mut self, img: &af::Image, to_doc: Affine) -> Option<Surface> {
let (w, h, rgba) = self.pixels(img)?;
let grey: Vec<u8> = rgba.chunks_exact(4).map(|p| p[0]).collect();
let grey: Vec<u8> = rgba.as_chunks::<4>().0.iter().map(|p| p[0]).collect();
let m = to_doc.mul(&affine(img.transform));
self.resample(w, h, &grey, m, 1)
}