Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kun FAN committed Apr 28, 2022
1 parent bf151db commit 808f386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions query/src/common/hashtable/two_level_hash_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct TwoLevelHashTable<Key: HashTableKeyable, Entity: HashTableEntity<Key>

impl <Key: HashTableKeyable, Entity: HashTableEntity<Key>> TwoLevelHashTable<Key, Entity> {
pub fn create() -> TwoLevelHashTable<Key, Entity> {
let mut hash_tables: Vec::<HashTable<Key, Entity>> = Vec::new();
let mut hash_tables: Vec::<HashTable<Key, Entity>> = Vec::with_capacity(NUM_BUCKETS);

for index in 0..NUM_BUCKETS {
hash_tables.push(HashTable::<Key, Entity>::create());
Expand All @@ -61,7 +61,7 @@ impl <Key: HashTableKeyable, Entity: HashTableEntity<Key>> TwoLevelHashTable<Key

#[inline(always)]
pub fn iter(&self) -> TwoLevelHashTableIter<Key, Entity> {
let mut iters = Vec::new();
let mut iters = Vec::with_capacity(NUM_BUCKETS);
for i in 0..NUM_BUCKETS {
iters.push(self.hash_tables[i].iter())
}
Expand Down

0 comments on commit 808f386

Please sign in to comment.