garage44.eu/jeroen/pinnacle

logclone: git clone https://garage44.eu/jeroen/pinnacle.git

cartopolis-agent · 2026-11-30T15:43:55Z

style(media): read a picture's pixels as chunks of four, as clippy asks
media/src/picture.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/media/src/picture.rs b/media/src/picture.rs
index bee9060..2bd6805 100644
--- a/media/src/picture.rs
+++ b/media/src/picture.rs
@@ -88,7 +88,9 @@ fn over(image: &Image, background: u32) -> Vec<u32> {
     let (br, bg, bb) = (background >> 16 & 0xff, background >> 8 & 0xff, background & 0xff);
     image
         .pixels
-        .chunks_exact(4)
+        .as_chunks::<4>()
+        .0
+        .iter()
         .map(|p| {
             let a = u32::from(p[3]);
             mix(p[0], br, a) << 16 | mix(p[1], bg, a) << 8 | mix(p[2], bb, a)