Fix warnings: unnecessary mut
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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,
|
||||
);
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user