mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Run cargo fmt
This commit is contained in:
parent
e3ce111548
commit
f18fc52675
10 changed files with 17 additions and 19 deletions
|
|
@ -4,10 +4,10 @@ use std::path::PathBuf;
|
|||
use std::sync::Arc;
|
||||
|
||||
use anyhow::Context;
|
||||
use aquatic_toml_config::TomlConfig;
|
||||
use arc_swap::{ArcSwap, Cache};
|
||||
use hashbrown::HashSet;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use aquatic_toml_config::TomlConfig;
|
||||
|
||||
/// Access list mode. Available modes are white, black and off.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, TomlConfig, Serialize, Deserialize)]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use aquatic_toml_config::TomlConfig;
|
||||
use hwloc::{CpuSet, ObjectType, Topology, CPUBIND_THREAD};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use aquatic_toml_config::TomlConfig;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, TomlConfig, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ use std::{
|
|||
time::Duration,
|
||||
};
|
||||
|
||||
use aquatic_toml_config::TomlConfig;
|
||||
use privdrop::PrivDrop;
|
||||
use serde::Deserialize;
|
||||
use aquatic_toml_config::TomlConfig;
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, TomlConfig, Deserialize)]
|
||||
#[serde(default)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue