mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 04:48:21 +00:00
Clippy clean (#536)
* Change into_iter to iter * Fix clippy 'easy' warnings * Clippy eth2/utils * Add struct NetworkInfo * Clippy for types, utils, and beacon_node/store/src/iters.rs * Cargo fmt * Change foo to my_foo * Remove complex signature * suppress clippy warning for unit_value in benches * Use enumerate instead of iterating over range * Allow trivially_copy_pass_by_ref in serde_utils
This commit is contained in:
@@ -21,7 +21,7 @@ lazy_static! {
|
||||
|
||||
/// Zero nodes to act as "synthetic" left and right subtrees of other zero nodes.
|
||||
static ref ZERO_NODES: Vec<MerkleTree> = {
|
||||
(0..MAX_TREE_DEPTH + 1).map(MerkleTree::Zero).collect()
|
||||
(0..=MAX_TREE_DEPTH).map(MerkleTree::Zero).collect()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ mod tests {
|
||||
let merkle_tree = MerkleTree::create(&leaves, depth);
|
||||
let merkle_root = merkle_tree.hash();
|
||||
|
||||
let proofs_ok = (0..leaves.len()).into_iter().all(|i| {
|
||||
let proofs_ok = (0..leaves.len()).all(|i| {
|
||||
let (leaf, branch) = merkle_tree.generate_proof(i, depth);
|
||||
leaf == leaves[i] && verify_merkle_proof(leaf, &branch, depth, i, merkle_root)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user