mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-07 12:33:14 +00:00
Size the deduped
set appropriately.
Avoids lots of resizing as the set fills up.
This commit is contained in:
parent
1c583c0b91
commit
3c99b3dbd0
@ -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…
Reference in New Issue
Block a user