From b98968ca40f25fa75870e5eaf19aa3a9ce9c2cfb Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 8 Nov 2026 01:30:46 -0800 Subject: [PATCH] Narrow writes device test: the host words through as_chunks, as clippy asks of a constant chunk size clippy (--cfg m2v_gpu, the M3's job m3-max-7723) refused chunks_exact(4) with a constant size. Verified: the M3's clippy of the runtime reruns next. (cherry picked from commit 7f60624041671d7a0d8d5888003a5555f267f938) --- .../metal2vulkan-runtime/src/tests/narrow_writes_device.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/tests/narrow_writes_device.rs b/crates/metal2vulkan-runtime/src/tests/narrow_writes_device.rs index f59203e8b..1a005336a 100644 --- a/crates/metal2vulkan-runtime/src/tests/narrow_writes_device.rs +++ b/crates/metal2vulkan-runtime/src/tests/narrow_writes_device.rs @@ -84,10 +84,8 @@ fn fill(host: &Host, texel: u64) -> Vec { }, ) .collect(); - let words: Vec = bytes - .chunks_exact(4) - .map(|word| u32::from_le_bytes([word[0], word[1], word[2], word[3]])) - .collect(); + let (words, _) = bytes.as_chunks::<4>(); + let words: Vec = words.iter().map(|&word| u32::from_le_bytes(word)).collect(); host.set(0, &words); bytes }