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() }