clippy: as_chunks for fixed-size pixel and pair chunks (Rust 1.99 lint was red on main)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-05 06:24:06 +07:00
committed by bflatastic
co-authored by Claude Opus 5.5
parent c4236e1bb2
commit 0f241aac9f
7 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ impl Image {
}
/// Number of pixels for which `pred(rgba)` holds.
pub fn count(&self, pred: impl Fn([u8; 4]) -> bool) -> usize {
self.rgba.chunks_exact(4).filter(|p| pred([p[0], p[1], p[2], p[3]])).count()
self.rgba.as_chunks::<4>().0.iter().filter(|p| pred([p[0], p[1], p[2], p[3]])).count()
}
/// Pixels that differ from opaque white and are not fully transparent.
pub fn ink(&self) -> usize {