Clippy 1.99: use as_chunks for constant-size chunks, and say the gate targets the latest stable

Clippy 1.99.0 added `chunks_exact_to_as_chunks`, which fails `cargo xtask ci`
at its clippy step. Eight uses of `chunks_exact(_mut)` with a constant size now
use `as_chunks(_mut)` (stable since 1.88, within the 1.95 minimum): four in
crates/affinity, three in crates/effects and crates/engine tests, and two in
xtask's sha256. docs/development.md says the gate targets the current stable.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
Matthew FarrowandClaude Sonnet 5.5 committed 2026-10-09 10:43:23 -04:00
1 parent 16dcbc6138
commit 75151bd79a
7 files changed
+14 -12

No files matched your search

+3 -3
View File
@@ -19,10 +19,10 @@ pub fn hex(data: &[u8]) -> String {
msg.push(0);
}
msg.extend(bits.to_be_bytes());
for block in msg.chunks_exact(64) {
for block in msg.as_chunks::<64>().0.iter() {
let mut w = [0u32; 64];
for (i, word) in block.chunks_exact(4).enumerate() {
w[i] = u32::from_be_bytes([word[0], word[1], word[2], word[3]]);
for (i, word) in block.as_chunks::<4>().0.iter().enumerate() {
w[i] = u32::from_be_bytes(*word);
}
for i in 16..64 {
let s0 = w[i - 15].rotate_right(7) ^ w[i - 15].rotate_right(18) ^ (w[i - 15] >> 3);