1
0
Fork 0
forked from gorb/backend

refactor: cargo clippy

This commit is contained in:
Radical 2025-05-19 15:13:52 +02:00
parent 771cf72889
commit c21762ac7e
5 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@ use crate::Data;
pub fn get_auth_header(headers: &HeaderMap) -> Result<&str, HttpResponse> {
let auth_token = headers.get(actix_web::http::header::AUTHORIZATION);
if let None = auth_token {
if auth_token.is_none() {
return Err(HttpResponse::Unauthorized().finish());
}
@ -21,7 +21,7 @@ pub fn get_auth_header(headers: &HeaderMap) -> Result<&str, HttpResponse> {
let auth_value = auth.unwrap().split_whitespace().nth(1);
if let None = auth_value {
if auth_value.is_none() {
return Err(HttpResponse::BadRequest().finish());
}