From 60cee1d8ec6deca54c17d95ddac765ddfff6ccb9 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Wed, 19 Jun 2024 02:26:25 -0500 Subject: [PATCH] refactor(LakeWatchAPI): apply clippy recommendations --- LakeWatchAPI/src/routes/v1/mod.rs | 2 +- LakeWatchAPI/src/startup.rs | 1 + LakeWatchAPI/tests/api/helpers.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LakeWatchAPI/src/routes/v1/mod.rs b/LakeWatchAPI/src/routes/v1/mod.rs index 7e10f89..28207a5 100644 --- a/LakeWatchAPI/src/routes/v1/mod.rs +++ b/LakeWatchAPI/src/routes/v1/mod.rs @@ -10,5 +10,5 @@ pub mod status; pub struct ApiDoc; pub fn router() -> Router { - return Router::new().route("/status", get(crate::routes::v1::status::status)); + Router::new().route("/status", get(crate::routes::v1::status::status)) } diff --git a/LakeWatchAPI/src/startup.rs b/LakeWatchAPI/src/startup.rs index 327bd9a..74dc9c4 100644 --- a/LakeWatchAPI/src/startup.rs +++ b/LakeWatchAPI/src/startup.rs @@ -16,6 +16,7 @@ use utoipa::OpenApi; use utoipauto::utoipauto; use uuid::Uuid; +#[derive(Default)] pub struct Application {} #[utoipauto] diff --git a/LakeWatchAPI/tests/api/helpers.rs b/LakeWatchAPI/tests/api/helpers.rs index 737ea4b..d53b9cc 100644 --- a/LakeWatchAPI/tests/api/helpers.rs +++ b/LakeWatchAPI/tests/api/helpers.rs @@ -20,7 +20,7 @@ impl TestApp { self.socket_addr.ip(), self.socket_addr.port() ); - if path.starts_with("/") { + if path.starts_with('/') { format!("{}{}", address, path) } else { format!("{}/{}", address, path)