aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_server/src/lib.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-06-03 15:37:20 +0000
committerFuwn <[email protected]>2024-06-03 15:37:20 +0000
commit967774fc048b9d0738fbd13998ed77b6b70effa2 (patch)
treee0f9d650a221476852005eeaac96224584a3a76a /crates/whirl_server/src/lib.rs
parentformat: rustfmt with new rules (diff)
downloadwhirl-967774fc048b9d0738fbd13998ed77b6b70effa2.tar.xz
whirl-967774fc048b9d0738fbd13998ed77b6b70effa2.zip
refactor(crates): update idioms
Diffstat (limited to 'crates/whirl_server/src/lib.rs')
-rw-r--r--crates/whirl_server/src/lib.rs18
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