mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 05:11:09 +00:00
Fix clippy warnings (#7625)
* Fix clippy check Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Autofix clippy Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix trivial Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * suppress warnings Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Quiet clippy 😌 Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
a0f83eb992
commit
d501d92176
@@ -59,10 +59,10 @@ pub(crate) struct BackGarbageCandidates {
|
||||
}
|
||||
|
||||
impl OverseerGen for BackGarbageCandidates {
|
||||
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<DefaultSubsystemClient<RuntimeClient>>>, OverseerHandle),
|
||||
Error,
|
||||
|
||||
@@ -392,9 +392,8 @@ where
|
||||
let behave_maliciously = self.distribution.sample(&mut rand::thread_rng());
|
||||
match behave_maliciously {
|
||||
true => {
|
||||
let validation_result = ValidationResult::Invalid(
|
||||
self.fake_validation_error.clone().into(),
|
||||
);
|
||||
let validation_result =
|
||||
ValidationResult::Invalid(self.fake_validation_error.into());
|
||||
gum::info!(
|
||||
target: MALUS,
|
||||
para_id = ?candidate_receipt.descriptor.para_id,
|
||||
|
||||
@@ -76,10 +76,10 @@ pub(crate) struct DisputeValidCandidates {
|
||||
}
|
||||
|
||||
impl OverseerGen for DisputeValidCandidates {
|
||||
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<DefaultSubsystemClient<RuntimeClient>>>, OverseerHandle),
|
||||
Error,
|
||||
|
||||
@@ -99,7 +99,7 @@ where
|
||||
// equal to `p`. We use `rand::thread_rng` as the source of randomness.
|
||||
let generate_malicious_candidate = distribution.sample(&mut rand::thread_rng());
|
||||
|
||||
if generate_malicious_candidate == true {
|
||||
if generate_malicious_candidate {
|
||||
gum::debug!(target: MALUS, "😈 Suggesting malicious candidate.",);
|
||||
|
||||
let pov = PoV { block_data: BlockData(MALICIOUS_POV.into()) };
|
||||
@@ -253,10 +253,10 @@ pub(crate) struct SuggestGarbageCandidates {
|
||||
}
|
||||
|
||||
impl OverseerGen for SuggestGarbageCandidates {
|
||||
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<DefaultSubsystemClient<RuntimeClient>>>, OverseerHandle),
|
||||
Error,
|
||||
|
||||
Reference in New Issue
Block a user