cargo clippy

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

View File

@ -36,7 +36,7 @@ impl Session {
#[rtype(result = "()")]
pub struct PushNewSession(pub Session);
#[derive(Default)]
pub struct OpenIDSessionsActor {
session: Vec<Session>,
}
@ -47,12 +47,6 @@ impl OpenIDSessionsActor {
}
}
impl Default for OpenIDSessionsActor {
fn default() -> Self {
Self { session: vec![] }
}
}
impl Actor for OpenIDSessionsActor {
type Context = Context<Self>;

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!");
}