1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-11-04 16:38:52 +01:00

Remove unnecessary Result

This commit is contained in:
Jonas Platte 2022-01-19 23:56:55 +01:00
parent c6277c72a1
commit a0fc5eba72
No known key found for this signature in database
GPG key ID: 7D261D771D915378
2 changed files with 8 additions and 12 deletions

View file

@ -166,13 +166,12 @@ impl Uiaa {
user_id: &UserId,
device_id: &DeviceId,
session: &str,
) -> Result<Option<CanonicalJsonValue>> {
Ok(self
.userdevicesessionid_uiaarequest
) -> Option<CanonicalJsonValue> {
self.userdevicesessionid_uiaarequest
.read()
.unwrap()
.get(&(user_id.to_owned(), device_id.to_owned(), session.to_owned()))
.map(|j| j.to_owned()))
.map(|j| j.to_owned())
}
fn update_uiaa_session(

View file

@ -296,14 +296,11 @@ where
.and_then(|auth| auth.get("session"))
.and_then(|session| session.as_str())
.and_then(|session| {
db.uiaa
.get_uiaa_request(
&user_id,
&sender_device.clone().unwrap_or_else(|| "".into()),
session,
)
.ok()
.flatten()
db.uiaa.get_uiaa_request(
&user_id,
&sender_device.clone().unwrap_or_else(|| "".into()),
session,
)
})
{
for (key, value) in initial_request {