chore: make clippy

This commit is contained in:
draoi
2024-04-07 16:45:56 +02:00
parent fe0801bcf1
commit 225e9bbd72
2 changed files with 3 additions and 6 deletions

View File

@@ -352,8 +352,7 @@ impl HostContainer {
addr, color.clone());
} else {
list.push((addr.clone(), last_seen));
debug!(target: "net::hosts::store_or_update()", "Added [{}] to {:?} list",
addr, HostColor::try_from(color).unwrap());
debug!(target: "net::hosts::store_or_update()", "Added [{}] to {:?} list", addr, color);
if color_code == 0 && list.len() == GREYLIST_MAX_LEN {
let last_entry = list.pop().unwrap();

View File

@@ -96,9 +96,7 @@ async fn spawn_node(
..Default::default()
};
let p2p = P2p::new(settings, ex.clone()).await;
p2p
P2p::new(settings, ex.clone()).await
}
async fn spawn_seed_session(starting_port: usize, ex: Arc<Executor<'static>>) -> Vec<Arc<P2p>> {
@@ -200,7 +198,7 @@ async fn spawn_seed_session(starting_port: usize, ex: Arc<Executor<'static>>) ->
assert!(random_node.hosts().container.contains(color as usize, entry).await);
}*/
async fn get_random_gold_host(p2p_instances: &Vec<Arc<P2p>>, index: usize) -> ((Url, u64), usize) {
async fn get_random_gold_host(p2p_instances: &[Arc<P2p>], index: usize) -> ((Url, u64), usize) {
let random_node = &p2p_instances[index];
let external_addr = &random_node.settings().external_addrs[0];