mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Use regular (ahash) IndexMap for PeerMaps
This commit is contained in:
parent
5f0971e952
commit
c76d7442e2
7 changed files with 16 additions and 8 deletions
|
|
@ -1,6 +1,8 @@
|
|||
use std::net::{Ipv4Addr, Ipv6Addr};
|
||||
|
||||
use aquatic_common::{AmortizedIndexMap, SecondsSinceServerStart, ServerStartInstant, ValidUntil};
|
||||
use aquatic_common::{
|
||||
AmortizedIndexMap, IndexMap, SecondsSinceServerStart, ServerStartInstant, ValidUntil,
|
||||
};
|
||||
use aquatic_http_protocol::common::{AnnounceEvent, InfoHash, PeerId};
|
||||
use aquatic_http_protocol::response::ResponsePeer;
|
||||
|
||||
|
|
@ -55,7 +57,7 @@ pub struct PeerMapKey<I: Ip> {
|
|||
pub ip_address: I,
|
||||
}
|
||||
|
||||
pub type PeerMap<I> = AmortizedIndexMap<PeerMapKey<I>, Peer<I>>;
|
||||
pub type PeerMap<I> = IndexMap<PeerMapKey<I>, Peer<I>>;
|
||||
|
||||
pub struct TorrentData<I: Ip> {
|
||||
pub peers: PeerMap<I>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue