1
Fork 0

Rollup merge of #121895 - matthiaskrgr:devec, r=fee1-dead

avoid collecting into vecs in some places
This commit is contained in:
Matthias Krüger 2024-03-02 16:53:17 +01:00 committed by GitHub
commit fcf58059c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 33 deletions

View file

@ -57,7 +57,7 @@ impl<'tcx> ObligationStorage<'tcx> {
fn take_pending(&mut self) -> Vec<PredicateObligation<'tcx>> {
let mut obligations = mem::take(&mut self.pending);
obligations.extend(self.overflowed.drain(..));
obligations.append(&mut self.overflowed);
obligations
}