mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(clippy): enable if_then_some_else_none lint (#11679)
Signed-off-by: jsvisa <delweng@gmail.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -51,16 +51,14 @@ impl Compact for StoredSubNode {
|
||||
buf.advance(key_len);
|
||||
|
||||
let nibbles_exists = buf.get_u8() != 0;
|
||||
let nibble = if nibbles_exists { Some(buf.get_u8()) } else { None };
|
||||
let nibble = nibbles_exists.then(|| buf.get_u8());
|
||||
|
||||
let node_exists = buf.get_u8() != 0;
|
||||
let node = if node_exists {
|
||||
let node = node_exists.then(|| {
|
||||
let (node, rest) = BranchNodeCompact::from_compact(buf, 0);
|
||||
buf = rest;
|
||||
Some(node)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
node
|
||||
});
|
||||
|
||||
(Self { key, nibble, node }, buf)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user