From f6715487c000839294f86ab10b299e9129f4ca16 Mon Sep 17 00:00:00 2001 From: Taha-Mahmoodi <85902429+Taha-Mahmoodi@users.noreply.github.com> Date: Fri, 23 Oct 2026 18:22:15 +0430 Subject: [PATCH] Symbols: the thumbnail test reads pixels as four-byte chunks, as clippy asks --- crates/ui-egui/src/panels/symbols.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/ui-egui/src/panels/symbols.rs b/crates/ui-egui/src/panels/symbols.rs index 7cfe65a40..3cc70c803 100644 --- a/crates/ui-egui/src/panels/symbols.rs +++ b/crates/ui-egui/src/panels/symbols.rs @@ -422,8 +422,7 @@ mod tests { /// Pixels of `img` that something paints opaquely, and those of them that are red. fn painted(img: &vectorcraft_render::Rendered) -> (usize, usize) { - let px = img.pixels.chunks_exact(4); - let painted: Vec<&[u8]> = px.filter(|p| p[3] > 200).collect(); + let painted: Vec<&[u8; 4]> = img.pixels.as_chunks::<4>().0.iter().filter(|p| p[3] > 200).collect(); let red = painted.iter().filter(|p| p[0] > 150 && p[1] < 80 && p[2] < 80).count(); (painted.len(), red) }