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)
This commit is contained in:
1 parent
ba3e45f1d5
commit
9d232bf142
1 file changed
+2
-2
@@ -267,8 +267,8 @@ impl RecentShapes {
|
||||
|
||||
/// The one of them that is `state`'s shape, where one is.
|
||||
fn find(&self, state: &BindState) -> Option<Arc<BindShape>> {
|
||||
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()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user