test(io): read the cache-image fixture's values with as_chunks

clippy (with the async feature) flags chunks_exact with a constant size
in the AsyncHDF5File cache-image test added in d493d47.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
osobh
2026-09-26 11:52:06 -05:00
co-authored by Claude Opus 5.5
parent 4c01267b76
commit 00f94d57ed
+4 -2
View File
@@ -455,8 +455,10 @@ mod tests {
assert_eq!(info.shape, [50, 100]); assert_eq!(info.shape, [50, 100]);
let values: Vec<i32> = info let values: Vec<i32> = info
.raw .raw
.chunks_exact(4) .as_chunks::<4>()
.map(|b| i32::from_le_bytes(b.try_into().unwrap())) .0
.iter()
.map(|&b| i32::from_le_bytes(b))
.collect(); .collect();
let expected: Vec<i32> = (0..50).flat_map(|i| (0..100).map(move |j| i * j)).collect(); let expected: Vec<i32> = (0..50).flat_map(|i| (0..100).map(move |j| i * j)).collect();
assert_eq!(values, expected); assert_eq!(values, expected);