Skip to content

Commit f66187e

Browse files
committed
or_
1 parent f478078 commit f66187e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ulist/src/boolean.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl BooleanList {
181181
self._check_len_eq(other)?;
182182
let hset1 = self.na_indexes();
183183
let hset2 = other.na_indexes();
184-
let mut hset: HashSet<usize> = HashSet::new();
184+
let mut hset: HashSet<usize> = HashSet::with_capacity(max(hset1.len(), hset2.len()));
185185
let vec = self
186186
.values()
187187
.iter()
@@ -207,6 +207,7 @@ impl BooleanList {
207207
}
208208
})
209209
.collect();
210+
hset.shrink_to_fit();
210211
Ok(BooleanList::new(vec, hset))
211212
}
212213

0 commit comments

Comments
 (0)