diff --git a/2021/src/common.rs b/2021/src/common.rs index 162f2c1..123b7c3 100644 --- a/2021/src/common.rs +++ b/2021/src/common.rs @@ -113,7 +113,7 @@ impl BitSet { } pub fn with_capacity(capacity: usize) -> Self { - let buffer = Vec::with_capacity(capacity / 32); + let buffer = vec![0; capacity / 32]; Self { buffer } }