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);