Avoid allocating excess memory

This commit is contained in:
Christopher Berner 2020-05-07 09:39:27 -07:00
parent 48a9dcc2c0
commit e08c78a800

@ -215,7 +215,7 @@ impl U32VecMap {
pub fn with_capacity(start_key: usize, end_key: usize) -> U32VecMap {
U32VecMap {
offset: start_key,
elements: vec![0; end_key],
elements: vec![0; end_key - start_key],
}
}