Fix clippy warnings (#813)

* Clippy account manager

* Clippy account_manager

* Clippy beacon_node/beacon_chain

* Clippy beacon_node/client

* Clippy beacon_node/eth1

* Clippy beacon_node/eth2-libp2p

* Clippy beacon_node/genesis

* Clippy beacon_node/network

* Clippy beacon_node/rest_api

* Clippy beacon_node/src

* Clippy beacon_node/store

* Clippy eth2/lmd_ghost

* Clippy eth2/operation_pool

* Clippy eth2/state_processing

* Clippy eth2/types

* Clippy eth2/utils/bls

* Clippy eth2/utils/cahced_tree_hash

* Clippy eth2/utils/deposit_contract

* Clippy eth2/utils/eth2_interop_keypairs

* Clippy eth2/utils/eth2_testnet_config

* Clippy eth2/utils/lighthouse_metrics

* Clippy eth2/utils/ssz

* Clippy eth2/utils/ssz_types

* Clippy eth2/utils/tree_hash_derive

* Clippy lcli

* Clippy tests/beacon_chain_sim

* Clippy validator_client

* Cargo fmt
This commit is contained in:
pscott
2020-01-21 11:38:56 +04:00
committed by Age Manning
parent 1abb964652
commit 7396cd2cab
78 changed files with 387 additions and 416 deletions

View File

@@ -311,11 +311,7 @@ fn bench_block<T: EthSpec>(
)
.expect("should get indexed attestation");
(
local_spec.clone(),
local_state.clone(),
indexed_attestation.clone(),
)
(local_spec.clone(), local_state.clone(), indexed_attestation)
},
|(spec, ref mut state, indexed_attestation)| {
black_box(
@@ -349,11 +345,7 @@ fn bench_block<T: EthSpec>(
)
.expect("should get indexed attestation");
(
local_spec.clone(),
local_state.clone(),
indexed_attestation.clone(),
)
(local_spec.clone(), local_state.clone(), indexed_attestation)
},
|(spec, ref mut state, indexed_attestation)| {
black_box(
@@ -373,7 +365,7 @@ fn bench_block<T: EthSpec>(
);
let local_block = block.clone();
let local_state = state.clone();
let local_state = state;
c.bench(
&title,
Benchmark::new("get_attesting_indices", move |b| {
@@ -409,7 +401,7 @@ fn bench_block<T: EthSpec>(
.sample_size(10),
);
let local_block = block.clone();
let local_block = block;
c.bench(
&title,
Benchmark::new("ssz_block_len", move |b| {

View File

@@ -29,7 +29,7 @@ where
F: FnMut(&mut BlockBuilder<T>),
G: FnMut(&mut BeaconBlock<T>),
{
let (mut block, state) = get_block::<T, _>(mutate_builder);
let (mut block, mut state) = get_block::<T, _>(mutate_builder);
/*
* Control check to ensure the valid block should pass verification.
@@ -79,7 +79,7 @@ where
assert_eq!(
per_block_processing(
&mut state.clone(),
&mut state,
&block,
None,
BlockSignatureStrategy::VerifyBulk,