mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 03:31:10 +00:00
Fix minor clippy lints in grandpa (#5988)
* grandpa: fix clippy lints about identity conversions * grandpa: fix clippy lints about unwrap_or_default * grandpa: fix clippy lints about explicit return * grandpa: fix clippy lints about unnecessary intermediary * grandpa: fix clippy lints about to_string * grandpa: fix clippy lints about unused imports * grandpa: fix clippy lints about increments * grandpa: fix clippy lints about unnecessary matches * grandpa: fix clippy lints about struct arguments * Fix clippy::redundant_clone * Fix clippy::clone_on_copy * Fix clippy::or_fun_call * Fix clippy::identity_conversion
This commit is contained in:
@@ -183,7 +183,7 @@ impl<B, Block> sc_network::config::FinalityProofProvider<Block> for FinalityProo
|
||||
let request: FinalityProofRequest<Block::Hash> = Decode::decode(&mut &request[..])
|
||||
.map_err(|e| {
|
||||
warn!(target: "afg", "Unable to decode finality proof request: {}", e.what());
|
||||
ClientError::Backend(format!("Invalid finality proof request"))
|
||||
ClientError::Backend("Invalid finality proof request".to_string())
|
||||
})?;
|
||||
match request {
|
||||
FinalityProofRequest::Original(request) => prove_finality::<_, _, GrandpaJustification<Block>>(
|
||||
@@ -397,7 +397,7 @@ pub(crate) fn prove_finality<Block: BlockT, B: BlockchainBackend<Block>, J>(
|
||||
}
|
||||
|
||||
// else search for the next justification
|
||||
current_number = current_number + One::one();
|
||||
current_number += One::one();
|
||||
}
|
||||
|
||||
if finality_proof.is_empty() {
|
||||
@@ -513,7 +513,7 @@ fn check_finality_proof_fragment<Block: BlockT, B, J>(
|
||||
new_authorities_proof,
|
||||
)?;
|
||||
|
||||
current_set_id = current_set_id + 1;
|
||||
current_set_id += 1;
|
||||
}
|
||||
|
||||
Ok(AuthoritiesOrEffects::Effects(FinalityEffects {
|
||||
|
||||
Reference in New Issue
Block a user