Fix clippy warnings (#1385)

## Issue Addressed

NA

## Proposed Changes

Fixes most clippy warnings and ignores the rest of them, see issue #1388.
This commit is contained in:
blacktemplar
2020-07-23 14:18:00 +00:00
parent ba10c80633
commit 23a8f31f83
93 changed files with 396 additions and 396 deletions

View File

@@ -104,6 +104,7 @@ pub enum ChainSyncingState {
}
impl<T: BeaconChainTypes> SyncingChain<T> {
#[allow(clippy::too_many_arguments)]
pub fn new(
id: u64,
start_epoch: Epoch,
@@ -257,7 +258,7 @@ impl<T: BeaconChainTypes> SyncingChain<T> {
/// Sends a batch to the batch processor.
fn process_batch(&mut self, mut batch: Batch<T::EthSpec>) {
let downloaded_blocks = std::mem::replace(&mut batch.downloaded_blocks, Vec::new());
let process_id = ProcessId::RangeBatchId(self.id.clone(), batch.id.clone());
let process_id = ProcessId::RangeBatchId(self.id, batch.id);
self.current_processing_batch = Some(batch);
spawn_block_processor(
Arc::downgrade(&self.chain.clone()),