mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 00:42:42 +00:00
Rust 1.54.0 lints (#2483)
## Issue Addressed N/A ## Proposed Changes - Removing a bunch of unnecessary references - Updated `Error::VariantError` to `Error::Variant` - There were additional enum variant lints that I ignored, because I thought our variant names were fine - removed `MonitoredValidator`'s `pubkey` field, because I couldn't find it used anywhere. It looks like we just use the string version of the pubkey (the `id` field) if there is no index ## Additional Info Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
@@ -270,11 +270,11 @@ mod tests {
|
||||
return TestResult::discard();
|
||||
}
|
||||
|
||||
let leaves: Vec<_> = int_leaves.into_iter().map(H256::from_low_u64_be).collect();
|
||||
let leaves_iter = int_leaves.into_iter().map(H256::from_low_u64_be);
|
||||
|
||||
let mut merkle_tree = MerkleTree::create(&[], depth);
|
||||
|
||||
let proofs_ok = leaves.into_iter().enumerate().all(|(i, leaf)| {
|
||||
let proofs_ok = leaves_iter.enumerate().all(|(i, leaf)| {
|
||||
assert_eq!(merkle_tree.push_leaf(leaf, depth), Ok(()));
|
||||
let (stored_leaf, branch) = merkle_tree.generate_proof(i, depth);
|
||||
stored_leaf == leaf && verify_merkle_proof(leaf, &branch, depth, i, merkle_tree.hash())
|
||||
|
||||
Reference in New Issue
Block a user