Use with_capacity

This commit is contained in:
Ayaz Hafiz 2022-06-07 16:23:42 -04:00
parent 87a1b3b42d
commit 5b8d24d823
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 5 additions and 1 deletions

View file

@ -1703,7 +1703,7 @@ fn find_specialization_lambda_sets(
// unspecialized lambda sets that don't belong to our specialization, and should be resolved
// later.
let mut leftover_uls = UlsOfVar::default();
let mut specialization_lambda_sets: VecMap<u8, Variable> = VecMap::default();
let mut specialization_lambda_sets: VecMap<u8, Variable> = VecMap::with_capacity(uls.len());
for (spec_var, lambda_sets) in uls.drain() {
if !matches!(subs.get_content_without_compacting(spec_var), Content::Alias(name, _, _, AliasKind::Opaque) if *name == opaque)