fixes for nightly clippy (#1618)

This commit is contained in:
Svyatoslav Nikolsky
2022-10-28 11:46:40 +03:00
committed by Bastian Köcher
parent 9592b55fea
commit f58e076ca2
22 changed files with 45 additions and 45 deletions
@@ -168,7 +168,7 @@ impl<P: SubstrateFinalitySyncPipeline> SourceClient<FinalitySyncPipelineAdapter<
let justification = match decoded_justification {
Ok(j) => j,
Err(err) => {
log_error(format!("decode failed with error {:?}", err));
log_error(format!("decode failed with error {err:?}"));
continue
},
};
@@ -21,8 +21,8 @@ use relay_utils::metrics::{FloatJsonValueMetric, PrometheusError, StandaloneMetr
/// Creates standalone token price metric.
pub fn token_price_metric(token_id: &str) -> Result<FloatJsonValueMetric, PrometheusError> {
FloatJsonValueMetric::new(
format!("https://api.coingecko.com/api/v3/simple/price?ids={}&vs_currencies=btc", token_id),
format!("$.{}.btc", token_id),
format!("https://api.coingecko.com/api/v3/simple/price?ids={token_id}&vs_currencies=btc"),
format!("$.{token_id}.btc"),
format!("{}_to_base_conversion_rate", token_id.replace('-', "_")),
format!("Rate used to convert from {} to some BASE tokens", token_id.to_uppercase()),
)
@@ -85,15 +85,15 @@ impl<AccountId> TaggedAccount<AccountId> {
/// Returns stringified account tag.
pub fn tag(&self) -> String {
match *self {
TaggedAccount::Headers { ref bridged_chain, .. } => format!("{}Headers", bridged_chain),
TaggedAccount::Headers { ref bridged_chain, .. } => format!("{bridged_chain}Headers"),
TaggedAccount::Parachains { ref bridged_chain, .. } => {
format!("{}Parachains", bridged_chain)
format!("{bridged_chain}Parachains")
},
TaggedAccount::Messages { ref bridged_chain, .. } => {
format!("{}Messages", bridged_chain)
format!("{bridged_chain}Messages")
},
TaggedAccount::MessagesPalletOwner { ref bridged_chain, .. } => {
format!("{}MessagesPalletOwner", bridged_chain)
format!("{bridged_chain}MessagesPalletOwner")
},
}
}
@@ -172,9 +172,9 @@ async fn background_task<P: SubstrateFinalitySyncPipeline>(
// submit mandatory header if some headers are missing
let best_finalized_source_header_at_source_fmt =
format!("{:?}", best_finalized_source_header_at_source);
format!("{best_finalized_source_header_at_source:?}");
let best_finalized_source_header_at_target_fmt =
format!("{:?}", best_finalized_source_header_at_target);
format!("{best_finalized_source_header_at_target:?}");
let required_header_number_value = *required_header_number.lock().await;
let mandatory_scan_range = mandatory_headers_scan_range::<P::SourceChain>(
best_finalized_source_header_at_source.ok(),