mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-25 09:11:34 +11:00
Correctly initialise to 16 elements
This commit is contained in:
parent
bfdca7117d
commit
c0d9f0ab41
|
@ -1,7 +1,7 @@
|
||||||
use alloc::{vec, vec::Vec};
|
use alloc::vec::Vec;
|
||||||
use core::{
|
use core::{
|
||||||
hash::{BuildHasher, BuildHasherDefault, Hash, Hasher},
|
hash::{BuildHasher, BuildHasherDefault, Hash, Hasher},
|
||||||
mem,
|
iter, mem,
|
||||||
};
|
};
|
||||||
|
|
||||||
use rustc_hash::FxHasher;
|
use rustc_hash::FxHasher;
|
||||||
|
@ -46,10 +46,7 @@ impl<K, V> HashMap<K, V> {
|
||||||
Self {
|
Self {
|
||||||
number_of_elements: 0,
|
number_of_elements: 0,
|
||||||
max_distance_to_initial_bucket: 0,
|
max_distance_to_initial_bucket: 0,
|
||||||
nodes: vec![
|
nodes: iter::repeat_with(|| None).take(16).collect(),
|
||||||
None, None, None, None, None, None, None, None, None, None, None, None, None, None,
|
|
||||||
None, None,
|
|
||||||
],
|
|
||||||
hasher: Default::default(),
|
hasher: Default::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue