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
@@ -79,7 +79,7 @@ impl std::str::FromStr for ConversionRateOverride {
f64::from_str(s)
.map(ConversionRateOverride::Explicit)
.map_err(|e| format!("Failed to parse '{:?}'. Expected 'metric' or explicit value", e))
.map_err(|e| format!("Failed to parse '{e:?}'. Expected 'metric' or explicit value"))
}
}
@@ -105,7 +105,7 @@ where
.await?;
log::info!(target: "bridge", "Fee: {:?}", Balance(fee.into()));
println!("{}", fee);
println!("{fee}");
Ok(())
}
}
+3 -3
View File
@@ -215,7 +215,7 @@ impl std::str::FromStr for HexBytes {
impl std::fmt::Debug for HexBytes {
fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(fmt, "0x{}", self)
write!(fmt, "0x{self}")
}
}
@@ -275,7 +275,7 @@ where
V::from_str(s)
.map(ExplicitOrMaximal::Explicit)
.map_err(|e| format!("Failed to parse '{:?}'. Expected 'max' or explicit value", e))
.map_err(|e| format!("Failed to parse '{e:?}'. Expected 'max' or explicit value"))
}
}
@@ -298,7 +298,7 @@ mod tests {
fn hex_bytes_display_matches_from_str_for_clap() {
// given
let hex = HexBytes(vec![1, 2, 3, 4]);
let display = format!("{}", hex);
let display = format!("{hex}");
// when
let hex2: HexBytes = display.parse().unwrap();
@@ -398,10 +398,10 @@ async fn update_transaction_tip<C: Chain, S: TransactionSignScheme<Chain = C>>(
tip_limit: C::Balance,
target_priority: TransactionPriority,
) -> Result<(bool, S::SignedTransaction), SubstrateError> {
let stx = format!("{:?}", tx);
let stx = format!("{tx:?}");
let mut current_priority = client.validate_transaction(at_block.1, tx.clone()).await??.priority;
let mut unsigned_tx = S::parse_transaction(tx).ok_or_else(|| {
SubstrateError::Custom(format!("Failed to parse {} transaction {}", C::NAME, stx,))
SubstrateError::Custom(format!("Failed to parse {} transaction {stx}", C::NAME,))
})?;
let old_tip = unsigned_tx.tip;