mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 08:11:24 +01:00
enable map_unwrap_or lint
This commit is contained in:
parent
645d88177a
commit
224ba65d06
10 changed files with 81 additions and 73 deletions
|
|
@ -348,12 +348,11 @@ impl service::users::Data for KeyValueDatabase {
|
|||
fn last_one_time_keys_update(&self, user_id: &UserId) -> Result<u64> {
|
||||
self.userid_lastonetimekeyupdate
|
||||
.get(user_id.as_bytes())?
|
||||
.map(|bytes| {
|
||||
.map_or(Ok(0), |bytes| {
|
||||
utils::u64_from_bytes(&bytes).map_err(|_| {
|
||||
Error::bad_database("Count in roomid_lastroomactiveupdate is invalid.")
|
||||
})
|
||||
})
|
||||
.unwrap_or(Ok(0))
|
||||
}
|
||||
|
||||
fn take_one_time_key(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue