From e7da679cb3122ddac7c6252c6b30ccec4e04ec20 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Sat, 10 Oct 2026 01:10:36 -0400 Subject: [PATCH] LR-IMP-FORMATS: word16_order reads sample pairs with as_chunks instead of indexing Co-Authored-By: Claude Opus 5.5 --- crates/raw/src/vendor/arw.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/raw/src/vendor/arw.rs b/crates/raw/src/vendor/arw.rs index cb66f7754..cc5854234 100644 --- a/crates/raw/src/vendor/arw.rs +++ b/crates/raw/src/vendor/arw.rs @@ -429,8 +429,7 @@ fn word16_order(strip: &[u8], bits: u32, file: lightcraft_tiff::ByteOrder) -> li let (mut n, mut over_file, mut over_other) = (0usize, 0usize, 0usize); let words = strip.len() / 2; let step = (words / 65536).max(1); - for i in (0..words).step_by(step) { - let b = [strip[2 * i], strip[2 * i + 1]]; + for &b in strip.as_chunks::<2>().0.iter().step_by(step) { n += 1; over_file += usize::from(u32::from(file.u16(b)) >= limit); over_other += usize::from(u32::from(other.u16(b)) >= limit);