Skip to content

Commit

Permalink
Appease clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhit committed Oct 11, 2023
1 parent ee89078 commit 67603c2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions node/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ fn testnet_genesis(
balances: endowed_accounts
.iter()
.cloned()
.chain(initial_authorities.iter().map(|x| x.0.clone()))
.chain(initial_authorities.iter().map(|x| x.0))
.map(|k| (k, ENDOWMENT))
.collect(),
},
Expand All @@ -242,8 +242,8 @@ fn testnet_genesis(
.iter()
.map(|(acct, grandpa, babe, imon)| {
(
acct.clone(),
acct.clone(),
*acct,
*acct,
session_keys(grandpa.clone(), babe.clone(), imon.clone()),
)
})
Expand All @@ -256,14 +256,14 @@ fn testnet_genesis(
.iter()
.map(|x| {
(
x.0.clone(),
x.0.clone(),
x.0,
x.0,
STASH,
frontier_template_runtime::StakerStatus::Validator,
)
})
.collect(),
invulnerables: initial_authorities.iter().map(|x| x.0.clone()).collect(),
invulnerables: initial_authorities.iter().map(|x| x.0).collect(),
slash_reward_fraction: Perbill::from_percent(10),
..Default::default()
},
Expand Down
2 changes: 1 addition & 1 deletion node/src/rpc/eth/consensus_data_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ where
authorities: Vec<(AuthorityId, BabeAuthorityWeight)>,
) -> Result<Self, Error> {
let config =
sc_consensus_babe::configuration(&*client).map_err(|e| Error::MissingConfig(e))?;
sc_consensus_babe::configuration(&*client).map_err(Error::MissingConfig)?;

Ok(Self {
client,
Expand Down
4 changes: 2 additions & 2 deletions node/src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ where
if let Some(babe_worker) = babe_worker {
io.merge(
Babe::new(
client.clone(),
babe_worker.clone(),
client,
babe_worker,
keystore,
select_chain,
deny_unsafe,
Expand Down
12 changes: 6 additions & 6 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -274,20 +274,20 @@ where
Ok((slot, timestamp, dynamic_fee))
};

let frontier_block_import = FrontierBlockImport::new(babe_import.clone(), client.clone());
let frontier_block_import = FrontierBlockImport::new(babe_import, client.clone());

let (import_queue, babe_worker) =
sc_consensus_babe::import_queue(sc_consensus_babe::ImportQueueParams {
link: babe_link.clone(),
link: babe_link,
block_import: frontier_block_import.clone(),
justification_import: Some(Box::new(grandpa_block_import.clone())),
client: client.clone(),
justification_import: Some(Box::new(grandpa_block_import)),
client,
select_chain,
create_inherent_data_providers,
spawner: &task_manager.spawn_essential_handle(),
registry: config.prometheus_registry(),
telemetry: telemetry.as_ref().map(|x| x.clone()),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool.clone()),
telemetry: telemetry.as_ref().cloned(),
offchain_tx_pool_factory: OffchainTransactionPoolFactory::new(transaction_pool),
})?;

Ok((
Expand Down

0 comments on commit 67603c2

Please sign in to comment.