From 9a7f30050f8efc52340e698031a7a55a105e72c4 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Sun, 30 Aug 2026 21:15:00 +0200 Subject: Use as_chunks for fixed-size pixel iteration --- crates/wayland/src/cursor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/wayland/src/cursor.rs') diff --git a/crates/wayland/src/cursor.rs b/crates/wayland/src/cursor.rs index 0ad5248..3a35f05 100644 --- a/crates/wayland/src/cursor.rs +++ b/crates/wayland/src/cursor.rs @@ -661,7 +661,7 @@ fn load_theme_cursor(theme: &xcursor::CursorTheme, size: u32, names: &[&str]) -> /// bitmap built here. fn rgba_to_bgra(pixels_rgba: &[u8]) -> Vec { let mut bgra = Vec::with_capacity(pixels_rgba.len()); - for px in pixels_rgba.chunks_exact(4) { + for px in pixels_rgba.as_chunks::<4>().0 { bgra.push(px[2]); bgra.push(px[1]); bgra.push(px[0]); -- cgit v1.2.3