Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-07-03 08:28:00 +02:00
parent 991a3340e5
commit 776d24031b
16 changed files with 24 additions and 27 deletions

View File

@ -79,10 +79,7 @@ pub async fn request_reset_password(
match users_service::get_by_mail(&req.mail).await {
Ok(mut user) => users_service::request_reset_password(&mut user).await?,
Err(e) => {
log::error!(
"Could not locate user account {}! (error silently ignored)",
e
);
log::error!("Could not locate user account {e}! (error silently ignored)");
}
}
@ -122,7 +119,7 @@ pub async fn check_reset_password_token(
RatedAction::CheckResetPasswordTokenFailed,
)
.await?;
log::error!("Password reset token could not be used: {}", e);
log::error!("Password reset token could not be used: {e}");
return Ok(HttpResponse::NotFound().finish());
}
};
@ -156,7 +153,7 @@ pub async fn reset_password(remote_ip: RemoteIP, req: web::Json<ResetPasswordBod
RatedAction::CheckResetPasswordTokenFailed,
)
.await?;
log::error!("Password reset token could not be used: {}", e);
log::error!("Password reset token could not be used: {e}");
return Ok(HttpResponse::NotFound().finish());
}
};
@ -196,7 +193,7 @@ pub async fn password_login(remote_ip: RemoteIP, req: web::Json<PasswordLoginQue
let user = match users_service::get_by_mail(&req.mail).await {
Ok(u) => u,
Err(e) => {
log::error!("Auth failed: could not find account by mail! {}", e);
log::error!("Auth failed: could not find account by mail! {e}");
rate_limiter_service::record_action(remote_ip.0, RatedAction::FailedPasswordLogin)
.await?;
return Ok(HttpResponse::Unauthorized().json("Invalid credentials"));