cargo clippy
This commit is contained in:
parent
5633aae029
commit
88e34902c0
@ -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>;
|
||||
|
||||
|
@ -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!");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user