common: rename AHashIndexMap to AmortizedIndexMap

This commit is contained in:
Joakim Frostegård 2022-03-20 19:42:46 +01:00
parent 9e49cb0bca
commit 5176b18ef9
5 changed files with 15 additions and 14 deletions

View file

@ -9,7 +9,8 @@ pub mod access_list;
pub mod cpu_pinning;
pub mod privileges;
pub type AHashIndexMap<K, V> = indexmap_amortized::IndexMap<K, V, RandomState>;
/// Amortized IndexMap using AHash hasher
pub type AmortizedIndexMap<K, V> = indexmap_amortized::IndexMap<K, V, RandomState>;
/// Peer or connection valid until this instant
///
@ -38,7 +39,7 @@ impl ValidUntil {
#[inline]
pub fn extract_response_peers<K, V, R, F>(
rng: &mut impl Rng,
peer_map: &AHashIndexMap<K, V>,
peer_map: &AmortizedIndexMap<K, V>,
max_num_peers_to_take: usize,
sender_peer_map_key: K,
peer_conversion_function: F,