Fix warnings: unnecessary mut

This commit is contained in:
adria0
2020-07-29 11:00:04 +02:00
committed by Artem Vorotnikov
parent cacbf256fe
commit c5aed5bab1
11 changed files with 68 additions and 68 deletions

View File

@@ -302,7 +302,7 @@ impl Importer {
) = {
let mut imported_blocks = Vec::with_capacity(max_blocks_to_import);
let mut invalid_blocks = HashSet::new();
let mut proposed_blocks = Vec::with_capacity(max_blocks_to_import);
let proposed_blocks = Vec::with_capacity(max_blocks_to_import);
let mut import_results = Vec::with_capacity(max_blocks_to_import);
let _import_lock = self.import_lock.lock();

View File

@@ -294,7 +294,7 @@ impl Clique {
"Back-filling block state. last_checkpoint_number: {}, target: {}({}).",
last_checkpoint_number, header.number(), header.hash());
let mut chain: &mut VecDeque<Header> = &mut VecDeque::with_capacity(
let chain: &mut VecDeque<Header> = &mut VecDeque::with_capacity(
(header.number() - last_checkpoint_number + 1) as usize,
);

View File

@@ -308,7 +308,7 @@ impl Engine<EthereumMachine> for Arc<Ethash> {
let n_uncles = block.uncles.len();
// Bestow block rewards.
let mut result_block_reward = reward + reward.shr(5) * U256::from(n_uncles);
let result_block_reward = reward + reward.shr(5) * U256::from(n_uncles);
rewards.push((author, RewardKind::Author, result_block_reward));

View File

@@ -325,7 +325,7 @@ fn do_json_test_for<H: FnMut(&str, HookType)>(
&mut tracer,
&mut vm_tracer,
));
let mut evm = vm_factory.create(params, &schedule, 0);
let evm = vm_factory.create(params, &schedule, 0);
let res = evm
.exec(&mut ex)
.ok()