diff options
| author | Fuwn <[email protected]> | 2024-06-03 15:37:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-03 15:37:20 -0700 |
| commit | 714d9b3cf1851ffe02424f0742126d3e82c76ccb (patch) | |
| tree | c9ab6b0f57ec91e351bcc5cadf33de925b136048 /crates/whirl_server/src/lib.rs | |
| parent | format: rustfmt with new rules (diff) | |
| download | whirl-714d9b3cf1851ffe02424f0742126d3e82c76ccb.tar.xz whirl-714d9b3cf1851ffe02424f0742126d3e82c76ccb.zip | |
refactor(crates): update idioms
Diffstat (limited to 'crates/whirl_server/src/lib.rs')
| -rw-r--r-- | crates/whirl_server/src/lib.rs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/crates/whirl_server/src/lib.rs b/crates/whirl_server/src/lib.rs index e8fdb6f..410522b 100644 --- a/crates/whirl_server/src/lib.rs +++ b/crates/whirl_server/src/lib.rs @@ -18,7 +18,13 @@ html_logo_url = "https://raw.githubusercontent.com/Whirlsplash/assets/master/Whirl.png", html_favicon_url = "https://raw.githubusercontent.com/Whirlsplash/assets/master/Whirl.png" )] -#![allow(non_local_definitions, dead_code)] +#![allow( + non_local_definitions, + dead_code, + clippy::cast_possible_truncation, + clippy::cast_sign_loss, + clippy::cast_possible_wrap +)] #[macro_use] extern crate log; #[macro_use] extern crate async_trait; @@ -53,7 +59,7 @@ pub enum ServerType { // https://stackoverflow.com/a/32712140/14452787 impl fmt::Display for ServerType { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{:?}", self) + write!(f, "{self:?}") } } @@ -123,7 +129,7 @@ pub mod make { pub fn distributor() -> JoinHandle<()> { tokio::spawn(async move { crate::distributor::Distributor::listen( - &*format!( + &format!( "{}:{}", Config::get().whirlsplash.ip, Config::get().distributor.port @@ -144,11 +150,7 @@ pub mod make { pub fn hub() -> JoinHandle<()> { tokio::spawn(async move { crate::hub::Hub::listen( - &*format!( - "{}:{}", - Config::get().whirlsplash.ip, - Config::get().hub.port - ), + &format!("{}:{}", Config::get().whirlsplash.ip, Config::get().hub.port), ServerType::Room, ) .await |