From 9d232bf142d5efa8e0fc63ade382dc6b5bd1bb80 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 4 Nov 2026 19:00:52 -0800 Subject: [PATCH] Bind the recent shapes' iterator mutably where a lost shape is looked for among them RecentShapes::find called Iterator::find on an immutable binding, which did not compile (E0596), so 977d728ec3 left the runtime unbuildable. Verified: cargo clippy --workspace --all-targets --all-features -- -D warnings passes on this tree, plain and with --cfg m2v_gpu (with the next commit's lane fix), on the M3. (cherry picked from commit ec98e5b5ca796142bb139864d950ccb632ecc2a8) --- crates/metal2vulkan-runtime/src/live_bind.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/live_bind.rs b/crates/metal2vulkan-runtime/src/live_bind.rs index 5627efc20..df8b170df 100644 --- a/crates/metal2vulkan-runtime/src/live_bind.rs +++ b/crates/metal2vulkan-runtime/src/live_bind.rs @@ -267,8 +267,8 @@ impl RecentShapes { /// The one of them that is `state`'s shape, where one is. fn find(&self, state: &BindState) -> Option> { - let found = self.0.iter().rev(); - found + let mut latest_first = self.0.iter().rev(); + latest_first .find(|shape| state.has_shape_beside_used(shape)) .cloned() }