mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +00:00
Run cargo fmt
This commit is contained in:
parent
e3ce111548
commit
f18fc52675
10 changed files with 17 additions and 19 deletions
|
|
@ -52,16 +52,14 @@ where
|
|||
if peer_map_len <= max_num_peers_to_take + 1 {
|
||||
let mut peers = Vec::with_capacity(peer_map_len);
|
||||
|
||||
peers.extend(peer_map
|
||||
.iter()
|
||||
.filter_map(|(k, v)| {
|
||||
if *k == sender_peer_map_key {
|
||||
None
|
||||
} else {
|
||||
Some(peer_conversion_function(v))
|
||||
}
|
||||
}));
|
||||
|
||||
peers.extend(peer_map.iter().filter_map(|(k, v)| {
|
||||
if *k == sender_peer_map_key {
|
||||
None
|
||||
} else {
|
||||
Some(peer_conversion_function(v))
|
||||
}
|
||||
}));
|
||||
|
||||
peers
|
||||
} else {
|
||||
let half_num_to_take = max_num_peers_to_take / 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue