From d0749ed7a924fec5a0e3b6ea6c830bf8e9331739 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Thu, 8 Oct 2026 23:57:22 -0400 Subject: [PATCH] HEIC: as_chunks for 16-bit samples (clippy 1.99, caught by the new heif CI step) Co-Authored-By: Claude Opus 5.5 --- crates/codecs/src/heif.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/codecs/src/heif.rs b/crates/codecs/src/heif.rs index cb451f0c41..fe91c0af58 100644 --- a/crates/codecs/src/heif.rs +++ b/crates/codecs/src/heif.rs @@ -54,8 +54,8 @@ pub(crate) fn decode(bytes: &[u8], opts: &DecodeOptions) -> Result { // The decoder re-reads the container; trust its output's shape, not the probe's. let buf = if decoded.sixteen_bit { let mut v = Vec::with_capacity(decoded.data.len() / 2); - for pair in decoded.data.chunks_exact(2).filter_map(|p| <[u8; 2]>::try_from(p).ok()) { - v.push(u16::from_ne_bytes(pair)); + for pair in decoded.data.as_chunks::<2>().0 { + v.push(u16::from_ne_bytes(*pair)); } Buf::U16(v) } else {