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:
bors 2021-11-06 20:14:37 +00:00
commit 0727994435
2 changed files with 6 additions and 6 deletions

View file

@ -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
}