fix bloom bitvecjournal storage allocation (#6390)

This commit is contained in:
Hawstein 2017-08-28 15:19:04 +08:00 committed by Tomasz Drwięga
parent 15c3233376
commit 622632616c
1 changed files with 2 additions and 2 deletions

View File

@ -37,9 +37,9 @@ struct BitVecJournal {
impl BitVecJournal {
pub fn new(size: usize) -> BitVecJournal {
let extra = if size % 8 > 0 { 1 } else { 0 };
let extra = if size % 64 > 0 { 1 } else { 0 };
BitVecJournal {
elems: vec![0u64; size / 8 + extra],
elems: vec![0u64; size / 64 + extra],
journal: HashSet::new(),
}
}