mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 09:45:31 +00:00
Explicity use IndexMap::swap_remove to silence warnings
This commit is contained in:
parent
0b6a02e1a7
commit
e705c03981
4 changed files with 6 additions and 6 deletions
|
|
@ -97,7 +97,7 @@ pub fn run_statistics_worker(
|
|||
*count -= 1;
|
||||
|
||||
if *count == 0 {
|
||||
peers.remove(&peer_id);
|
||||
peers.swap_remove(&peer_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ impl<I: Ip> LargePeerMap<I> {
|
|||
}
|
||||
|
||||
fn remove_peer(&mut self, key: &ResponsePeer<I>) -> Option<Peer> {
|
||||
let opt_removed_peer = self.peers.remove(key);
|
||||
let opt_removed_peer = self.peers.swap_remove(key);
|
||||
|
||||
if let Some(Peer {
|
||||
is_seeder: true, ..
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue