aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_api/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-06-03 15:37:20 -0700
committerFuwn <[email protected]>2024-06-03 15:37:20 -0700
commit714d9b3cf1851ffe02424f0742126d3e82c76ccb (patch)
treec9ab6b0f57ec91e351bcc5cadf33de925b136048 /crates/whirl_api/src
parentformat: rustfmt with new rules (diff)
downloadwhirl-714d9b3cf1851ffe02424f0742126d3e82c76ccb.tar.xz
whirl-714d9b3cf1851ffe02424f0742126d3e82c76ccb.zip
refactor(crates): update idioms
Diffstat (limited to 'crates/whirl_api/src')
-rw-r--r--crates/whirl_api/src/lib.rs3
-rw-r--r--crates/whirl_api/src/routes/worlds/info/mod.rs2
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/whirl_api/src/lib.rs b/crates/whirl_api/src/lib.rs
index 589fda0..24b8136 100644
--- a/crates/whirl_api/src/lib.rs
+++ b/crates/whirl_api/src/lib.rs
@@ -18,6 +18,7 @@
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(clippy::cast_precision_loss)]
#[macro_use] extern crate log;
#[macro_use] extern crate serde_derive;
@@ -63,7 +64,7 @@ impl Api {
#[must_use]
pub fn make() -> tokio::task::JoinHandle<()> {
tokio::spawn(async move {
- crate::Api::listen(&*format!(
+ crate::Api::listen(&format!(
"{}:{}",
whirl_config::Config::get().whirlsplash.ip,
whirl_config::Config::get().whirlsplash.api.port
diff --git a/crates/whirl_api/src/routes/worlds/info/mod.rs b/crates/whirl_api/src/routes/worlds/info/mod.rs
index 382c07f..a9d098a 100644
--- a/crates/whirl_api/src/routes/worlds/info/mod.rs
+++ b/crates/whirl_api/src/routes/worlds/info/mod.rs
@@ -15,7 +15,7 @@ pub async fn info(
easy
.url(&format!(
"http://www-dynamic.us.worlds.net/cgi-bin/profile.pl?{}",
- req.username.as_ref().unwrap_or(&"".to_string()),
+ req.username.as_ref().unwrap_or(&String::new()),
))
.unwrap();