1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 10:27:42 +02:00

chore: address clippy lints

This commit is contained in:
Rob Ede
2025-02-23 18:29:25 +00:00
parent 0f35de7da1
commit fc4b656c3b
2 changed files with 4 additions and 6 deletions

View File

@ -83,8 +83,10 @@ async fn login(request: HttpRequest) -> impl Responder {
}
#[post("/logout")]
async fn logout(user: Identity) -> impl Responder {
user.logout();
async fn logout(user: Option<Identity>) -> impl Responder {
if let Some(user) = user {
user.logout();
}
HttpResponse::Ok()
}
```