From dd573cdb3032de76e449b8966090bccd29d59abc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Frosteg=C3=A5rd?= Date: Sun, 28 Nov 2021 22:11:21 +0100 Subject: [PATCH] Run cargo fmt --- aquatic_http/src/lib.rs | 11 ++++++++--- aquatic_http/src/workers/mod.rs | 2 +- aquatic_udp/src/common.rs | 4 ++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/aquatic_http/src/lib.rs b/aquatic_http/src/lib.rs index 54ed266..1975aac 100644 --- a/aquatic_http/src/lib.rs +++ b/aquatic_http/src/lib.rs @@ -15,8 +15,8 @@ use std::{ use crate::config::Config; mod common; -mod workers; pub mod config; +mod workers; pub const APP_NAME: &str = "aquatic_http: HTTP/TLS BitTorrent tracker"; @@ -115,8 +115,13 @@ pub fn run_inner(config: Config, state: State) -> anyhow::Result<()> { WorkerIndex::RequestWorker(i), ); - workers::request::run_request_worker(config, state, request_mesh_builder, response_mesh_builder) - .await + workers::request::run_request_worker( + config, + state, + request_mesh_builder, + response_mesh_builder, + ) + .await }); executors.push(executor); diff --git a/aquatic_http/src/workers/mod.rs b/aquatic_http/src/workers/mod.rs index 5f41ab1..63fc0ec 100644 --- a/aquatic_http/src/workers/mod.rs +++ b/aquatic_http/src/workers/mod.rs @@ -1,2 +1,2 @@ pub mod request; -pub mod socket; \ No newline at end of file +pub mod socket; diff --git a/aquatic_udp/src/common.rs b/aquatic_udp/src/common.rs index 085a82a..06c1e75 100644 --- a/aquatic_udp/src/common.rs +++ b/aquatic_udp/src/common.rs @@ -89,7 +89,7 @@ impl ConnectedRequestSender { addr: SocketAddr, ) { match self.senders[index.0].try_send((self.index, request, addr)) { - Ok(()) => {}, + Ok(()) => {} Err(TrySendError::Full(_)) => { ::log::error!("Request channel {} is full, dropping request. Try increasing number of request workers or raising config.worker_channel_size.", index.0) } @@ -116,7 +116,7 @@ impl ConnectedResponseSender { addr: SocketAddr, ) { match self.senders[index.0].try_send((response, addr)) { - Ok(()) => {}, + Ok(()) => {} Err(TrySendError::Full(_)) => { ::log::error!("Response channel {} is full, dropping response. Try increasing number of socket workers or raising config.worker_channel_size.", index.0) }