cargo clippy

This commit is contained in:
2022-04-09 12:25:56 +02:00
parent 5633aae029
commit 88e34902c0
2 changed files with 2 additions and 9 deletions

View File

@ -87,8 +87,7 @@ pub async fn authorize(user: CurrentUser, query: web::Query<AuthorizeQuery>,
}.render().unwrap());
}
let scopes = query.scope.split(' ').collect::<Vec<_>>();
if !scopes.contains(&"openid") {
if !query.scope.split(' ').any(|x| x == "openid") {
return error_redirect(&query, "invalid_request", "openid scope missing!");
}