Fix partialeq_to_none clippy lint (#27696)
This commit is contained in:
parent
cf1c44184c
commit
53149a18ad
|
@ -33,7 +33,7 @@ impl<'a> ProofEntry<'a> {
|
|||
left_sibling: Option<&'a Hash>,
|
||||
right_sibling: Option<&'a Hash>,
|
||||
) -> Self {
|
||||
assert!((None == left_sibling) ^ (None == right_sibling));
|
||||
assert!(left_sibling.is_none() ^ right_sibling.is_none());
|
||||
Self(target, left_sibling, right_sibling)
|
||||
}
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ impl MerkleTree {
|
|||
let level = &self.nodes[level_start..(level_start + level_len)];
|
||||
|
||||
let target = &level[node_index];
|
||||
if lsib != None || rsib != None {
|
||||
if lsib.is_some() || rsib.is_some() {
|
||||
path.push(ProofEntry::new(target, lsib, rsib));
|
||||
}
|
||||
if node_index % 2 == 0 {
|
||||
|
|
Loading…
Reference in New Issue