From 7dbedfd1514b772036e59a85b994ae3f3bc0da36 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Tue, 3 Nov 2026 23:48:30 -0800 Subject: [PATCH] Iterate the pull-model lane's colour attachments instead of indexing them The nightly's clippy (needless_range_loop) flags the index loop, which compiles only under --cfg m2v_gpu, so the earlier sweep's plain clippy did not see it. Verified: RUSTFLAGS='--cfg m2v_gpu' cargo clippy --workspace --all-targets --all-features -- -D warnings clean on nightly-2026-11-03. --- .../src/runtime_lane/pull_model_interpolation.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-validation/src/runtime_lane/pull_model_interpolation.rs b/crates/metal2vulkan-validation/src/runtime_lane/pull_model_interpolation.rs index 0eb65ae43..274f6e1a4 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane/pull_model_interpolation.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane/pull_model_interpolation.rs @@ -319,8 +319,8 @@ impl Lane { fn descriptor(&self, draw: &Draw, n: u32) -> RenderPipelineDescriptor { let mut d = RenderPipelineDescriptor::new(self.function("pm_place")); d.fragment = Some(self.function(draw.function)); - for i in 0..draw.reads.len() { - d.color_attachments[i] = Some(ColorAttachmentDescriptor::new(draw.format)); + for slot in d.color_attachments.iter_mut().take(draw.reads.len()) { + *slot = Some(ColorAttachmentDescriptor::new(draw.format)); } d.raster_sample_count = n; d