mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
common: rename AHashIndexMap to AmortizedIndexMap
This commit is contained in:
parent
9e49cb0bca
commit
5176b18ef9
5 changed files with 15 additions and 14 deletions
|
|
@ -3,7 +3,7 @@ use std::sync::Arc;
|
|||
use std::time::Instant;
|
||||
|
||||
use aquatic_common::access_list::{create_access_list_cache, AccessListArcSwap, AccessListCache};
|
||||
use aquatic_common::{AHashIndexMap, CanonicalSocketAddr};
|
||||
use aquatic_common::{AmortizedIndexMap, CanonicalSocketAddr};
|
||||
use either::Either;
|
||||
use smartstring::{LazyCompact, SmartString};
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ pub struct PeerMapKey<I: Ip> {
|
|||
pub ip_or_key: Either<I, SmartString<LazyCompact>>,
|
||||
}
|
||||
|
||||
pub type PeerMap<I> = AHashIndexMap<PeerMapKey<I>, Peer<I>>;
|
||||
pub type PeerMap<I> = AmortizedIndexMap<PeerMapKey<I>, Peer<I>>;
|
||||
|
||||
pub struct TorrentData<I: Ip> {
|
||||
pub peers: PeerMap<I>,
|
||||
|
|
@ -159,7 +159,7 @@ impl<I: Ip> Default for TorrentData<I> {
|
|||
}
|
||||
}
|
||||
|
||||
pub type TorrentMap<I> = AHashIndexMap<InfoHash, TorrentData<I>>;
|
||||
pub type TorrentMap<I> = AmortizedIndexMap<InfoHash, TorrentData<I>>;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct TorrentMaps {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue