Auto merge of #90655 - the8472:drain-dot-dot, r=jyn514
Replace some uses of vec.drain(..) with vec.into_iter() IntoIter should optimize better than Drain
This commit is contained in:
commit
0727994435
2 changed files with 6 additions and 6 deletions
|
@ -2665,7 +2665,7 @@ impl<'tcx> UserTypeProjections {
|
|||
mut self,
|
||||
mut f: impl FnMut(UserTypeProjection) -> UserTypeProjection,
|
||||
) -> Self {
|
||||
self.contents = self.contents.drain(..).map(|(proj, span)| (f(proj), span)).collect();
|
||||
self.contents = self.contents.into_iter().map(|(proj, span)| (f(proj), span)).collect();
|
||||
self
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue