Warning fixes
All checks were successful
Rust Build / Check (pull_request) Successful in 59s
Rust Build / Test Suite (pull_request) Successful in 59s
Rust Build / Rustfmt (pull_request) Successful in 35s
Rust Build / Clippy (pull_request) Successful in 57s
Rust Build / build (pull_request) Successful in 1m29s

This commit is contained in:
2025-04-05 01:01:39 -04:00
parent 948b08d4c7
commit f6f2370fee
2 changed files with 3 additions and 3 deletions

View File

@@ -53,13 +53,13 @@ pub async fn register_user(
match repo::user::exists(&pool, &user.username).await { match repo::user::exists(&pool, &user.username).await {
Ok(res) => { Ok(res) => {
if res { if res {
return ( (
StatusCode::NOT_FOUND, StatusCode::NOT_FOUND,
Json(response::Response { Json(response::Response {
message: String::from("Error"), message: String::from("Error"),
data: vec![user], data: vec![user],
}), }),
); )
} else { } else {
match repo::user::insert(&pool, &user).await { match repo::user::insert(&pool, &user).await {
Ok(id) => { Ok(id) => {

View File

@@ -13,7 +13,7 @@ pub mod user {
SELECT 1 FROM "user" WHERE username = $1 SELECT 1 FROM "user" WHERE username = $1
"#, "#,
) )
.bind(&username) .bind(username)
.fetch_optional(pool) .fetch_optional(pool)
.await; .await;