Replace some uses of vec.drain(..) with vec.into_iter()
IntoIter should optimize better than Drain
This commit is contained in:
parent
d22dd65835
commit
ff87ff962c
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