From 4954ba3463d2656b096bcd124ea508a89c6a5f22 Mon Sep 17 00:00:00 2001 From: AskaEth Date: Mon, 2 Nov 2026 04:10:42 +0800 Subject: [PATCH] =?UTF-8?q?chore(app-iced):=20M75=20r5=20=E2=80=94?= =?UTF-8?q?=E2=80=94=20=E5=88=A0=E6=8E=89=E8=A2=AB=20count=5Fin=20?= =?UTF-8?q?=E5=8F=96=E4=BB=A3=E7=9A=84=20count=5Fpixels=EF=BC=88clippy=20d?= =?UTF-8?q?ead=5Fcode=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/app-iced/src/components/gallery/probe.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/crates/app-iced/src/components/gallery/probe.rs b/crates/app-iced/src/components/gallery/probe.rs index e53b38a..282408e 100644 --- a/crates/app-iced/src/components/gallery/probe.rs +++ b/crates/app-iced/src/components/gallery/probe.rs @@ -82,17 +82,6 @@ fn delta_ratio(pixel: [u8; 3], surface: [u8; 3], line: [u8; 3]) -> f32 { (dr + dg + db) / 3.0 } -/// 图上某个精确色的像素数(带容差)。 -fn count_pixels(shot: &Shot, color: [u8; 3]) -> usize { - (0..shot.height) - .map(|y| { - (0..shot.width) - .filter(|x| matches(shot.at(*x, y), color)) - .count() - }) - .sum() -} - /// `ULL_GALLERY_SHOT` → 截图路径(相对路径按**工作区根**解释:`cargo test` 的 cwd 是 crate 目录)。 fn shot_path() -> Option { let raw = std::env::var_os("ULL_GALLERY_SHOT")?;