srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland/src/udev/render.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/udev/render.rs
parentf2f9ed1b3f9c49b323ce591eb72a406058d324a4 (diff)
downloadsrdwm-9a7f30050f8efc52340e698031a7a55a105e72c4.tar.gz
srdwm-9a7f30050f8efc52340e698031a7a55a105e72c4.zip
Use as_chunks for fixed-size pixel iterationHEADmain
Diffstat (limited to 'crates/wayland/src/udev/render.rs')
-rw-r--r--crates/wayland/src/udev/render.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/wayland/src/udev/render.rs b/crates/wayland/src/udev/render.rs
index cefd759..83d721a 100644
--- a/crates/wayland/src/udev/render.rs
+++ b/crates/wayland/src/udev/render.rs
@@ -1532,7 +1532,7 @@ impl CompState {
if map.len() < expected_bytes {
return None;
}
- let read_channel = |offset: usize| -> Vec<u16> { map[offset..offset + size * 2].chunks_exact(2).map(|b| u16::from_ne_bytes([b[0], b[1]])).collect() };
+ let read_channel = |offset: usize| -> Vec<u16> { map[offset..offset + size * 2].as_chunks::<2>().0.iter().map(|b| u16::from_ne_bytes(*b)).collect() };
let red = read_channel(0);
let green = read_channel(size * 2);
let blue = read_channel(size * 4);