Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -125,13 +125,13 @@ async fn load_token_info(token: &LoginTokenValue) -> anyhow::Result<Option<Login
|
||||
let token = match user_tokens.iter_mut().find(|t| t.key == key) {
|
||||
Some(t) => t,
|
||||
None => {
|
||||
log::error!("Could not find token for key '{}' (missing token)", key);
|
||||
log::error!("Could not find token for key '{key}' (missing token)");
|
||||
return Ok(None);
|
||||
}
|
||||
};
|
||||
|
||||
if token.is_expired() {
|
||||
log::error!("Could not find token for key '{}' (token expired)", key);
|
||||
log::error!("Could not find token for key '{key}' (token expired)");
|
||||
return Ok(None);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ impl FromRequest for LoginToken {
|
||||
|
||||
let token = match load_token_info(&token).await {
|
||||
Err(e) => {
|
||||
log::error!("Failed to load auth token! {}", e);
|
||||
log::error!("Failed to load auth token! {e}");
|
||||
return Err(actix_web::error::ErrorPreconditionFailed(
|
||||
"Failed to check auth token!",
|
||||
));
|
||||
|
@@ -27,7 +27,7 @@ pub async fn send_mail<D: Display>(to: &str, subject: &str, body: D) -> anyhow::
|
||||
let mailer = mailer.build();
|
||||
|
||||
mailer.send(&email)?;
|
||||
log::debug!("A mail was sent to {} (subject = {})", to, subject);
|
||||
log::debug!("A mail was sent to {to} (subject = {subject})");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
@@ -168,7 +168,7 @@ pub mod loop_detection {
|
||||
None => false,
|
||||
Some(id) => {
|
||||
if curr_stack.contains(id) {
|
||||
log::debug!("Loop detected! {:?}", curr_stack);
|
||||
log::debug!("Loop detected! {curr_stack:?}");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user