From f6f2370fee1e8a9959d4222e0989da217e4c4c5b Mon Sep 17 00:00:00 2001 From: phoenix Date: Sat, 5 Apr 2025 01:01:39 -0400 Subject: [PATCH] Warning fixes --- src/callers/register.rs | 4 ++-- src/repo/mod.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/callers/register.rs b/src/callers/register.rs index a966c01..610f49b 100644 --- a/src/callers/register.rs +++ b/src/callers/register.rs @@ -53,13 +53,13 @@ pub async fn register_user( match repo::user::exists(&pool, &user.username).await { Ok(res) => { if res { - return ( + ( StatusCode::NOT_FOUND, Json(response::Response { message: String::from("Error"), data: vec![user], }), - ); + ) } else { match repo::user::insert(&pool, &user).await { Ok(id) => { diff --git a/src/repo/mod.rs b/src/repo/mod.rs index 709c7fd..951395f 100644 --- a/src/repo/mod.rs +++ b/src/repo/mod.rs @@ -13,7 +13,7 @@ pub mod user { SELECT 1 FROM "user" WHERE username = $1 "#, ) - .bind(&username) + .bind(username) .fetch_optional(pool) .await;