fix clippy issues (#1332)

This commit is contained in:
Svyatoslav Nikolsky
2022-03-01 17:26:02 +03:00
committed by Bastian Köcher
parent e656e0089e
commit bc1dcb7548
7 changed files with 13 additions and 12 deletions
@@ -312,7 +312,7 @@ async fn best_source_block_number_at_target<P: SubstrateFinalitySyncPipeline>(
target_client: &Client<P::TargetChain>,
) -> anyhow::Result<BlockNumberOf<P::SourceChain>> {
Ok(read_client_state::<P::TargetChain, P::SourceChain>(
&target_client,
target_client,
None,
P::SourceChain::BEST_FINALIZED_HEADER_ID_METHOD,
)
@@ -346,7 +346,7 @@ async fn find_mandatory_headers_in_range<P: SubstrateFinalitySyncPipeline>(
let mut mandatory_headers = Vec::new();
let mut current = range.0;
while current <= range.1 {
let (header, proof) = finality_source.header_and_finality_proof(current).await?.into();
let (header, proof) = finality_source.header_and_finality_proof(current).await?;
if header.is_mandatory() {
match proof {
Some(proof) => mandatory_headers.push((header, proof)),
@@ -412,7 +412,7 @@ fn make_mandatory_headers_batches<
} else {
current_batch_size = new_batch_size;
current_batch_weight = new_batch_weight;
i = i + 1;
i += 1;
}
}
if !headers_to_submit.is_empty() {
@@ -18,7 +18,7 @@ use crate::cli::{
bridge::FullBridge,
encode_call::{self, CliEncodeCall},
estimate_fee::estimate_message_delivery_and_dispatch_fee,
Balance, CliChain, ExplicitOrMaximal, HexBytes, HexLaneId, Origins, SourceConnectionParams,
Balance, ExplicitOrMaximal, HexBytes, HexLaneId, Origins, SourceConnectionParams,
SourceSigningParams, TargetConnectionParams, TargetSigningParams,
};
use bp_message_dispatch::{CallOrigin, MessagePayload};
@@ -304,6 +304,7 @@ pub(crate) fn compute_maximal_message_dispatch_weight(maximal_extrinsic_weight:
#[cfg(test)]
mod tests {
use super::*;
use crate::cli::CliChain;
use hex_literal::hex;
#[async_std::test]