Merge branch 'valkum-master-patch-25423' into 'master'
Make clippy happy (needless-return, etc.) See merge request famedly/conduit!23
This commit is contained in:
commit
bd6507eafb
7 changed files with 19 additions and 17 deletions
|
@ -95,7 +95,7 @@ pub async fn get_pushrule_route(
|
|||
if let Some(rule) = rule {
|
||||
Ok(get_pushrule::Response { rule }.into())
|
||||
} else {
|
||||
Err(Error::BadRequest(ErrorKind::NotFound, "Push rule not found.").into())
|
||||
Err(Error::BadRequest(ErrorKind::NotFound, "Push rule not found."))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -119,8 +119,7 @@ pub async fn login_route(
|
|||
let device_exists = body.device_id.as_ref().map_or(false, |device_id| {
|
||||
db.users
|
||||
.all_device_ids(&user_id)
|
||||
.find(|x| x.as_ref().map_or(false, |v| v == device_id))
|
||||
.is_some()
|
||||
.any(|x| x.as_ref().map_or(false, |v| v == device_id))
|
||||
});
|
||||
|
||||
if device_exists {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue