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:
@@ -111,12 +111,7 @@ pub struct AuthorizeQuery {
|
||||
}
|
||||
|
||||
fn error_redirect(query: &AuthorizeQuery, error: &str, description: &str) -> HttpResponse {
|
||||
log::warn!(
|
||||
"Failed to process sign in request ({} => {}): {:?}",
|
||||
error,
|
||||
description,
|
||||
query
|
||||
);
|
||||
log::warn!("Failed to process sign in request ({error} => {description}): {query:?}");
|
||||
HttpResponse::Found()
|
||||
.append_header((
|
||||
"Location",
|
||||
@@ -243,7 +238,7 @@ pub async fn authorize(
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
log::trace!("New OpenID session: {:#?}", session);
|
||||
log::trace!("New OpenID session: {session:#?}");
|
||||
logger.log(Action::NewOpenIDSession { client: &client });
|
||||
|
||||
Ok(HttpResponse::Found()
|
||||
@@ -319,12 +314,7 @@ struct ErrorResponse {
|
||||
}
|
||||
|
||||
pub fn error_response<D: Debug>(query: &D, error: &str, description: &str) -> HttpResponse {
|
||||
log::warn!(
|
||||
"request failed: {} - {} => '{:#?}'",
|
||||
error,
|
||||
description,
|
||||
query
|
||||
);
|
||||
log::warn!("request failed: {error} - {description} => '{query:#?}'");
|
||||
HttpResponse::BadRequest().json(ErrorResponse {
|
||||
error: error.to_string(),
|
||||
error_description: description.to_string(),
|
||||
@@ -389,7 +379,7 @@ pub async fn token(
|
||||
let decode = String::from_utf8_lossy(&match BASE64_STANDARD.decode(token) {
|
||||
Ok(d) => d,
|
||||
Err(e) => {
|
||||
log::error!("Failed to decode authorization header: {:?}", e);
|
||||
log::error!("Failed to decode authorization header: {e:?}");
|
||||
return Ok(error_response(
|
||||
&query,
|
||||
"invalid_request",
|
||||
|
||||
Reference in New Issue
Block a user