mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
enable if_then_some_else_none lint
This commit is contained in:
parent
bd6ea4e358
commit
52c2893073
4 changed files with 27 additions and 44 deletions
|
|
@ -14,7 +14,7 @@ impl service::rooms::state_compressor::Data for KeyValueDatabase {
|
|||
.ok_or_else(|| Error::bad_database("State hash does not exist"))?;
|
||||
let parent =
|
||||
utils::u64_from_bytes(&value[0..size_of::<u64>()]).expect("bytes have right length");
|
||||
let parent = if parent != 0 { Some(parent) } else { None };
|
||||
let parent = (parent != 0).then_some(parent);
|
||||
|
||||
let mut add_mode = true;
|
||||
let mut added = HashSet::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue