build: bump the toolchain to rust 1.98.1

This commit is contained in:
nolight132 committed 2026-09-17 15:31:41 +02:00
1 parent 2fd71f58a6
commit ac7ca92602
5 files changed
+8 -8

No files matched your search

+4 -3
View File
@@ -120,9 +120,10 @@ fn decode_utf16_frame(encoding: u8, bytes: &[u8]) -> String {
(1, [0xFF, 0xFE, rest @ ..]) => (rest, false),
_ => (bytes, true),
};
let units = bytes.chunks_exact(2).map(|pair| match big_endian {
true => u16::from_be_bytes([pair[0], pair[1]]),
false => u16::from_le_bytes([pair[0], pair[1]]),
let (pairs, _) = bytes.as_chunks::<2>();
let units = pairs.iter().map(|&pair| match big_endian {
true => u16::from_be_bytes(pair),
false => u16::from_le_bytes(pair),
});
char::decode_utf16(units).filter_map(Result::ok).collect()
}
+1 -1
View File
@@ -22,7 +22,7 @@ impl Icon {
let image = image.into_rgba8();
let (width, height) = image.dimensions();
let mut data = image.into_raw();
for pixel in data.chunks_exact_mut(4) {
for pixel in data.as_chunks_mut::<4>().0 {
pixel.rotate_right(1);
}
vec![ksni::Icon {
+1 -1
View File
@@ -208,7 +208,7 @@ fn artwork_frame(mut image: RgbaImage, edge: u32) -> RgbaImage {
}
fn bgra(image: &mut RgbaImage) {
for pixel in image.chunks_exact_mut(4) {
for pixel in image.as_chunks_mut::<4>().0 {
pixel.swap(0, 2);
}
}
+1 -2
View File
@@ -64,8 +64,7 @@ fn dominant(pixels: &[u8]) -> Option<Hsla> {
let mut bins = [Bin::default(); BINS];
let mut sampled = 0.;
for pixel in pixels.chunks_exact(4).step_by(stride) {
let [blue, green, red, alpha] = [pixel[0], pixel[1], pixel[2], pixel[3]];
for &[blue, green, red, alpha] in pixels.as_chunks::<4>().0.iter().step_by(stride) {
if alpha < MIN_ALPHA {
continue;
}
+1 -1
View File
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.97.1"
channel = "1.98.1"
components = [
"cargo",
"rustc",