Use regular (ahash) IndexMap for PeerMaps

This commit is contained in:
Joakim Frostegård 2022-08-06 16:50:56 +02:00
parent 5f0971e952
commit c76d7442e2
7 changed files with 16 additions and 8 deletions

View file

@ -13,7 +13,7 @@ use hashbrown::HashMap;
use rand::{rngs::SmallRng, SeedableRng};
use aquatic_common::{
extract_response_peers, AmortizedIndexMap, PanicSentinel, SecondsSinceServerStart,
extract_response_peers, AmortizedIndexMap, IndexMap, PanicSentinel, SecondsSinceServerStart,
ServerStartInstant,
};
use aquatic_ws_protocol::*;
@ -53,7 +53,7 @@ struct Peer {
pub valid_until: ValidUntil,
}
type PeerMap = AmortizedIndexMap<PeerId, Peer>;
type PeerMap = IndexMap<PeerId, Peer>;
struct TorrentData {
pub peers: PeerMap,