mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 11:07:56 +00:00
Clippyfy (#6341)
* Add clippy config and remove .cargo from gitignore * first fixes * Clippyfied * Add clippy CI job * comment out rusty-cachier * minor * fix ci * remove DAG from check-dependent-project * add DAG to clippy Co-authored-by: alvicsam <alvicsam@gmail.com>
This commit is contained in:
@@ -129,7 +129,7 @@ where
|
||||
|
||||
/// Obtain a prepared `OverseerBuilder`, that is initialized
|
||||
/// with all default values.
|
||||
pub fn prepared_overseer_builder<'a, Spawner, RuntimeClient>(
|
||||
pub fn prepared_overseer_builder<Spawner, RuntimeClient>(
|
||||
OverseerGenArgs {
|
||||
leaves,
|
||||
keystore,
|
||||
@@ -155,7 +155,7 @@ pub fn prepared_overseer_builder<'a, Spawner, RuntimeClient>(
|
||||
overseer_message_channel_capacity_override,
|
||||
req_protocol_names,
|
||||
peerset_protocol_names,
|
||||
}: OverseerGenArgs<'a, Spawner, RuntimeClient>,
|
||||
}: OverseerGenArgs<Spawner, RuntimeClient>,
|
||||
) -> Result<
|
||||
InitializedOverseerBuilder<
|
||||
SpawnGlue<Spawner>,
|
||||
@@ -257,7 +257,7 @@ where
|
||||
.collator_protocol({
|
||||
let side = match is_collator {
|
||||
IsCollator::Yes(collator_pair) => ProtocolSide::Collator(
|
||||
network_service.local_peer_id().clone(),
|
||||
network_service.local_peer_id(),
|
||||
collator_pair,
|
||||
collation_req_receiver,
|
||||
Metrics::register(registry)?,
|
||||
@@ -334,10 +334,10 @@ where
|
||||
/// would do.
|
||||
pub trait OverseerGen {
|
||||
/// Overwrite the full generation of the overseer, including the subsystems.
|
||||
fn generate<'a, Spawner, RuntimeClient>(
|
||||
fn generate<Spawner, RuntimeClient>(
|
||||
&self,
|
||||
connector: OverseerConnector,
|
||||
args: OverseerGenArgs<'a, Spawner, RuntimeClient>,
|
||||
args: OverseerGenArgs<Spawner, RuntimeClient>,
|
||||
) -> Result<(Overseer<SpawnGlue<Spawner>, Arc<RuntimeClient>>, OverseerHandle), Error>
|
||||
where
|
||||
RuntimeClient: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block> + AuxStore,
|
||||
@@ -358,10 +358,10 @@ use polkadot_overseer::KNOWN_LEAVES_CACHE_SIZE;
|
||||
pub struct RealOverseerGen;
|
||||
|
||||
impl OverseerGen for RealOverseerGen {
|
||||
fn generate<'a, Spawner, RuntimeClient>(
|
||||
fn generate<Spawner, RuntimeClient>(
|
||||
&self,
|
||||
connector: OverseerConnector,
|
||||
args: OverseerGenArgs<'a, Spawner, RuntimeClient>,
|
||||
args: OverseerGenArgs<Spawner, RuntimeClient>,
|
||||
) -> Result<(Overseer<SpawnGlue<Spawner>, Arc<RuntimeClient>>, OverseerHandle), Error>
|
||||
where
|
||||
RuntimeClient: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block> + AuxStore,
|
||||
|
||||
@@ -343,12 +343,11 @@ where
|
||||
// The Chain Selection subsystem is supposed to treat the finalized
|
||||
// block as the best leaf in the case that there are no viable
|
||||
// leaves, so this should not happen in practice.
|
||||
let best_leaf = self
|
||||
let best_leaf = *self
|
||||
.leaves()
|
||||
.await?
|
||||
.first()
|
||||
.ok_or_else(|| ConsensusError::Other(Box::new(Error::EmptyLeaves)))?
|
||||
.clone();
|
||||
.ok_or_else(|| ConsensusError::Other(Box::new(Error::EmptyLeaves)))?;
|
||||
|
||||
gum::trace!(target: LOG_TARGET, ?best_leaf, "Best chain");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user