avoid collecting into vecs in some places

This commit is contained in:
Matthias Krüger 2024-03-02 14:18:47 +01:00
parent 2e3581bca9
commit 7a48987006
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
}