cargo clippy

This commit is contained in:
Pierre HUBERT 2022-04-19 20:52:59 +02:00
parent 94aeefe450
commit e8b3828f2c
2 changed files with 2 additions and 4 deletions

View File

@ -48,9 +48,7 @@ impl<'a> SessionIdentity<'a> {
// Check if session is valid // Check if session is valid
if let Some(sess) = &res { if let Some(sess) = &res {
if sess.id.is_none() { sess.id.as_ref()?;
return None;
}
} }
res res

View File

@ -87,7 +87,7 @@ impl User {
} }
pub fn find_factor(&self, factor_id: &FactorID) -> Option<&TwoFactor> { pub fn find_factor(&self, factor_id: &FactorID) -> Option<&TwoFactor> {
self.two_factor.iter().find(|f| f.id.eq(&factor_id)) self.two_factor.iter().find(|f| f.id.eq(factor_id))
} }
} }