srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland/src/cursor.rs
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2026-08-30 21:15:00 +0200
committersrdusr <[email protected]>2026-08-30 21:15:00 +0200
commit9a7f30050f8efc52340e698031a7a55a105e72c4 (patch)
tree16e9becf63a51e706034bcd014320cdaafbe8b52 /crates/wayland/src/cursor.rs
parentf2f9ed1b3f9c49b323ce591eb72a406058d324a4 (diff)
downloadsrdwm-main.tar.gz
srdwm-main.zip
Use as_chunks for fixed-size pixel iterationHEADmain
Diffstat (limited to 'crates/wayland/src/cursor.rs')
-rw-r--r--crates/wayland/src/cursor.rs2
1 files changed, 1 insertions, 1 deletions
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<u8> {
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]);