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:
parent
c6277c72a1
commit
a0fc5eba72
2 changed files with 8 additions and 12 deletions
|
@ -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(
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue