Skip to content

Commit

Permalink
replace iter with into_iter()
Browse files Browse the repository at this point in the history
  • Loading branch information
ouz-a committed Apr 18, 2022
1 parent 70e67d6 commit 5364c86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/mir/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ impl<'tcx> MirPatch<'tcx> {
delta += 1;
}

for (stmt, target) in stmts_and_targets.iter().rev() {
body[*target].statements.insert(0, stmt.clone());
for (stmt, target) in stmts_and_targets.into_iter().rev() {
body[target].statements.insert(0, stmt);
}
}

Expand Down

0 comments on commit 5364c86

Please sign in to comment.