Size the deduped
set appropriately.
Avoids lots of resizing as the set fills up.
This commit is contained in:
parent
1c583c0b91
commit
3c99b3dbd0
1 changed files with 1 additions and 1 deletions
|
@ -1229,7 +1229,7 @@ fn opt_normalize_projection_type<'a, 'b, 'tcx>(
|
|||
Normalized { value: projected_term, obligations: projected_obligations }
|
||||
};
|
||||
|
||||
let mut deduped: SsoHashSet<_> = Default::default();
|
||||
let mut deduped = SsoHashSet::with_capacity(projected_obligations.len());
|
||||
result.obligations.retain(|obligation| deduped.insert(obligation.clone()));
|
||||
|
||||
if use_cache {
|
||||
|
|
Loading…
Add table
Reference in a new issue