mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
New rust lints for rustc 1.64.0 (#3602)
## Issue Addressed fixes lints from the last rust release ## Proposed Changes Fix the lints, most of the lints by `clippy::question-mark` are false positives in the form of https://github.com/rust-lang/rust-clippy/issues/9518 so it's allowed for now ## Additional Info
This commit is contained in:
@@ -100,9 +100,7 @@ impl MerkleTree {
|
||||
(Leaf(_), Leaf(_)) => return Err(MerkleTreeError::MerkleTreeFull),
|
||||
// There is a right node so insert in right node
|
||||
(Node(_, _, _), Node(_, _, _)) => {
|
||||
if let Err(e) = right.push_leaf(elem, depth - 1) {
|
||||
return Err(e);
|
||||
}
|
||||
right.push_leaf(elem, depth - 1)?;
|
||||
}
|
||||
// Both branches are zero, insert in left one
|
||||
(Zero(_), Zero(_)) => {
|
||||
|
||||
@@ -326,7 +326,7 @@ mod test {
|
||||
|
||||
assert_eq!(fixed[0], 1);
|
||||
assert_eq!(&fixed[0..1], &vec[0..1]);
|
||||
assert_eq!((&fixed[..]).len(), 8192);
|
||||
assert_eq!((fixed[..]).len(), 8192);
|
||||
|
||||
fixed[1] = 3;
|
||||
assert_eq!(fixed[1], 3);
|
||||
|
||||
@@ -308,7 +308,7 @@ mod test {
|
||||
|
||||
assert_eq!(fixed[0], 1);
|
||||
assert_eq!(&fixed[0..1], &vec[0..1]);
|
||||
assert_eq!((&fixed[..]).len(), 2);
|
||||
assert_eq!((fixed[..]).len(), 2);
|
||||
|
||||
fixed[1] = 3;
|
||||
assert_eq!(fixed[1], 3);
|
||||
|
||||
Reference in New Issue
Block a user