From 35ee13bf252eedc041b018caac9057faa99482bb Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sat, 14 Nov 2026 09:40:52 +0000 Subject: [PATCH] test: satisfy chunks exact clippy lint --- crates/codecs/tests/it/roundtrip.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/codecs/tests/it/roundtrip.rs b/crates/codecs/tests/it/roundtrip.rs index c1c6293ef1..5541d99fbf 100644 --- a/crates/codecs/tests/it/roundtrip.rs +++ b/crates/codecs/tests/it/roundtrip.rs @@ -776,9 +776,10 @@ fn pq_png_is_16_bit_rec2020_pq_with_cicp_and_content_light() { let brightest = rgb.iter().copied().fold(0.0f32, f32::max) * HDR_REFERENCE_WHITE_NITS; assert!((max_cll - brightest.ceil()).abs() <= 1.0, "{max_cll} vs {brightest}"); let max_fall = u32::from_be_bytes(bytes[at + 8..at + 12].try_into().unwrap()) / 10_000; - let expected_max_fall = (rgb.chunks_exact(3).map(|p| f64::from(p.iter().copied().fold(0.0f32, f32::max) * HDR_REFERENCE_WHITE_NITS)).sum::() - / f64::from(w * h)) - .ceil() as u32; + let expected_max_fall = + (rgb.as_chunks::<3>().0.iter().map(|p| f64::from(p.iter().copied().fold(0.0f32, f32::max) * HDR_REFERENCE_WHITE_NITS)).sum::() + / f64::from(w * h)) + .ceil() as u32; assert_eq!(max_fall, expected_max_fall, "MaxFALL uses CTA-861.3-A's per-pixel maximum channel"); assert!(bytes.windows(17).any(|w| w == b"XML:com.adobe.xmp"), "XMP kept"); assert!(bytes.windows(4).any(|w| w == b"pHYs"), "print resolution kept");