From 00f94d57eddddeed8736259e40a86fbac52efdcd Mon Sep 17 00:00:00 2001 From: osobh Date: Sat, 26 Sep 2026 11:52:01 -0500 Subject: [PATCH] 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) --- crates/clawhdf5-io/src/async_read.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/clawhdf5-io/src/async_read.rs b/crates/clawhdf5-io/src/async_read.rs index f5277c0..fa87355 100644 --- a/crates/clawhdf5-io/src/async_read.rs +++ b/crates/clawhdf5-io/src/async_read.rs @@ -455,8 +455,10 @@ mod tests { assert_eq!(info.shape, [50, 100]); let values: Vec = info .raw - .chunks_exact(4) - .map(|b| i32::from_le_bytes(b.try_into().unwrap())) + .as_chunks::<4>() + .0 + .iter() + .map(|&b| i32::from_le_bytes(b)) .collect(); let expected: Vec = (0..50).flat_map(|i| (0..100).map(move |j| i * j)).collect(); assert_eq!(values, expected);