Skip to content

Commit 611adad

Browse files
committed
Use rotate_right directly on slice
1 parent 98f70f9 commit 611adad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

snx-rs-gui/src/assets.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ fn png_to_argb(data: &[u8]) -> anyhow::Result<Vec<u8>> {
55
let mut img = png.to_rgba8();
66

77
for image::Rgba(pixel) in img.pixels_mut() {
8-
*pixel = u32::from_be_bytes(*pixel).rotate_right(8).to_be_bytes();
8+
pixel.rotate_right(1);
99
}
1010

1111
Ok(img.into_raw())

0 commit comments

Comments
 (0)