garage44.eu/jeroen/pinnacle

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

cartopolis-agent · 2026-11-30T15:44:16Z

style(xtask,media): the demo's and the tests' pixels as chunks of four, as clippy asks
media/src/tests.rs | 2 +-
 xtask/src/main.rs  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/media/src/tests.rs b/media/src/tests.rs
index ad9c3ff..dc081e1 100644
--- a/media/src/tests.rs
+++ b/media/src/tests.rs
@@ -115,7 +115,7 @@ fn adpcm_keeps_a_tone() {
 /// A PNG `w` × `h`: red on the left half, see-through blue on the right.
 fn png(w: u32, h: u32) -> Vec<u8> {
     let mut image = wil_core::Image::new(w, h);
-    for (i, p) in image.pixels.chunks_exact_mut(4).enumerate() {
+    for (i, p) in image.pixels.as_chunks_mut::<4>().0.iter_mut().enumerate() {
         let left = (i as u32 % w) < w / 2;
         p.copy_from_slice(if left { &[255, 0, 0, 255] } else { &[0, 0, 255, 0] });
     }
diff --git a/xtask/src/main.rs b/xtask/src/main.rs
index e6742e8..47131a7 100644
--- a/xtask/src/main.rs
+++ b/xtask/src/main.rs
@@ -3456,7 +3456,7 @@ fn contacts_demo() -> Result {
 fn harbour_png() -> Vec<u8> {
     let (w, h) = (960u32, 640u32);
     let mut image = wil_core::Image::new(w, h);
-    for (i, p) in image.pixels.chunks_exact_mut(4).enumerate() {
+    for (i, p) in image.pixels.as_chunks_mut::<4>().0.iter_mut().enumerate() {
         let (x, y) = ((i as u32 % w) as i32, (i as u32 / w) as i32);
         let horizon = 400;
         let (dx, dy) = (x - 620, y - 330);