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,
|
user_id: &UserId,
|
||||||
device_id: &DeviceId,
|
device_id: &DeviceId,
|
||||||
session: &str,
|
session: &str,
|
||||||
) -> Result<Option<CanonicalJsonValue>> {
|
) -> Option<CanonicalJsonValue> {
|
||||||
Ok(self
|
self.userdevicesessionid_uiaarequest
|
||||||
.userdevicesessionid_uiaarequest
|
|
||||||
.read()
|
.read()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.get(&(user_id.to_owned(), device_id.to_owned(), session.to_owned()))
|
.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(
|
fn update_uiaa_session(
|
||||||
|
|
|
@ -296,14 +296,11 @@ where
|
||||||
.and_then(|auth| auth.get("session"))
|
.and_then(|auth| auth.get("session"))
|
||||||
.and_then(|session| session.as_str())
|
.and_then(|session| session.as_str())
|
||||||
.and_then(|session| {
|
.and_then(|session| {
|
||||||
db.uiaa
|
db.uiaa.get_uiaa_request(
|
||||||
.get_uiaa_request(
|
&user_id,
|
||||||
&user_id,
|
&sender_device.clone().unwrap_or_else(|| "".into()),
|
||||||
&sender_device.clone().unwrap_or_else(|| "".into()),
|
session,
|
||||||
session,
|
)
|
||||||
)
|
|
||||||
.ok()
|
|
||||||
.flatten()
|
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
for (key, value) in initial_request {
|
for (key, value) in initial_request {
|
||||||
|
|
Loading…
Reference in a new issue