remove a couple clones

This commit is contained in:
Matthias Krüger 2025-04-19 18:11:57 +02:00
parent 49e5e4e3a5
commit de9323973a
2 changed files with 5 additions and 7 deletions

View file

@ -1530,7 +1530,7 @@ fn build_scope_drops<'tcx>(
// path, then don't generate the drop. (We only take this into
// account for non-unwind paths so as not to disturb the
// caching mechanism.)
if scope.moved_locals.iter().any(|&o| o == local) {
if scope.moved_locals.contains(&local) {
continue;
}