Warning fix
This commit is contained in:
+2
-2
@@ -69,8 +69,8 @@ pub async fn auth<B>(
|
|||||||
.get(axum::http::header::AUTHORIZATION)
|
.get(axum::http::header::AUTHORIZATION)
|
||||||
.and_then(|auth_header| auth_header.to_str().ok())
|
.and_then(|auth_header| auth_header.to_str().ok())
|
||||||
.and_then(|auth_value| {
|
.and_then(|auth_value| {
|
||||||
if auth_value.starts_with("Bearer ") {
|
if let Some(stripped) = auth_value.strip_prefix("Bearer ") {
|
||||||
Some(auth_value[7..].to_owned())
|
Some(String::from(stripped))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user