From f58e076ca237e5d06fb03e9d6d26f06c2587ca4c Mon Sep 17 00:00:00 2001
From: Svyatoslav Nikolsky <svyatonik@gmail.com>
Date: Fri, 28 Oct 2022 11:46:40 +0300
Subject: [PATCH] fixes for nightly clippy (#1618)

---
 bridges/bin/millau/node/src/chain_spec.rs              |  4 ++--
 bridges/bin/millau/node/src/command.rs                 |  2 +-
 bridges/bin/millau/node/src/service.rs                 |  4 ++--
 bridges/bin/rialto-parachain/node/src/chain_spec.rs    |  4 ++--
 bridges/bin/rialto-parachain/node/src/command.rs       |  6 +++---
 bridges/bin/rialto-parachain/node/src/service.rs       |  2 +-
 bridges/bin/rialto/node/src/chain_spec.rs              |  4 ++--
 bridges/bin/rialto/node/src/command.rs                 |  2 +-
 bridges/relays/bin-substrate/src/cli/estimate_fee.rs   |  4 ++--
 bridges/relays/bin-substrate/src/cli/mod.rs            |  6 +++---
 .../bin-substrate/src/cli/resubmit_transactions.rs     |  4 ++--
 bridges/relays/client-substrate/src/error.rs           |  2 +-
 bridges/relays/finality/src/finality_loop.rs           |  2 +-
 bridges/relays/finality/src/sync_loop_metrics.rs       | 10 +++++-----
 .../relays/lib-substrate-relay/src/finality/source.rs  |  2 +-
 bridges/relays/lib-substrate-relay/src/helpers.rs      |  4 ++--
 bridges/relays/lib-substrate-relay/src/lib.rs          |  8 ++++----
 .../lib-substrate-relay/src/on_demand/headers.rs       |  4 ++--
 bridges/relays/messages/src/message_race_loop.rs       |  2 +-
 bridges/relays/utils/src/initialize.rs                 |  8 ++++----
 bridges/relays/utils/src/lib.rs                        |  4 ++--
 bridges/relays/utils/src/metrics.rs                    |  2 +-
 22 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/bridges/bin/millau/node/src/chain_spec.rs b/bridges/bin/millau/node/src/chain_spec.rs
index 66ab997aa74..2ded668fdee 100644
--- a/bridges/bin/millau/node/src/chain_spec.rs
+++ b/bridges/bin/millau/node/src/chain_spec.rs
@@ -56,7 +56,7 @@ pub enum Alternative {
 
 /// Helper function to generate a crypto pair from seed
 pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
-	TPublic::Pair::from_string(&format!("//{}", seed), None)
+	TPublic::Pair::from_string(&format!("//{seed}"), None)
 		.expect("static values are valid; qed")
 		.public()
 }
@@ -150,7 +150,7 @@ fn endowed_accounts() -> Vec<AccountId> {
 	let all_authorities = ALL_AUTHORITIES_ACCOUNTS.iter().flat_map(|x| {
 		[
 			get_account_id_from_seed::<sr25519::Public>(x),
-			get_account_id_from_seed::<sr25519::Public>(&format!("{}//stash", x)),
+			get_account_id_from_seed::<sr25519::Public>(&format!("{x}//stash")),
 		]
 	});
 	vec![
diff --git a/bridges/bin/millau/node/src/command.rs b/bridges/bin/millau/node/src/command.rs
index e9f94b03a2a..b8dff87f8f2 100644
--- a/bridges/bin/millau/node/src/command.rs
+++ b/bridges/bin/millau/node/src/command.rs
@@ -62,7 +62,7 @@ impl SubstrateCli for Cli {
 			match id {
 				"" | "dev" => crate::chain_spec::Alternative::Development,
 				"local" => crate::chain_spec::Alternative::LocalTestnet,
-				_ => return Err(format!("Unsupported chain specification: {}", id)),
+				_ => return Err(format!("Unsupported chain specification: {id}")),
 			}
 			.load(),
 		))
diff --git a/bridges/bin/millau/node/src/service.rs b/bridges/bin/millau/node/src/service.rs
index 72ad071726b..72a1036c641 100644
--- a/bridges/bin/millau/node/src/service.rs
+++ b/bridges/bin/millau/node/src/service.rs
@@ -293,7 +293,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
 
 		Box::new(move |_, subscription_executor: sc_rpc::SubscriptionTaskExecutor| {
 			let mut io = RpcModule::new(());
-			let map_err = |e| sc_service::Error::Other(format!("{}", e));
+			let map_err = |e| sc_service::Error::Other(format!("{e}"));
 			io.merge(System::new(client.clone(), pool.clone(), DenyUnsafe::No).into_rpc())
 				.map_err(map_err)?;
 			io.merge(TransactionPayment::new(client.clone()).into_rpc()).map_err(map_err)?;
@@ -314,7 +314,7 @@ pub fn new_full(mut config: Configuration) -> Result<TaskManager, ServiceError>
 					beefy_rpc_links.from_voter_best_beefy_stream.clone(),
 					subscription_executor,
 				)
-				.map_err(|e| sc_service::Error::Other(format!("{}", e)))?
+				.map_err(|e| sc_service::Error::Other(format!("{e}")))?
 				.into_rpc(),
 			)
 			.map_err(map_err)?;
diff --git a/bridges/bin/rialto-parachain/node/src/chain_spec.rs b/bridges/bin/rialto-parachain/node/src/chain_spec.rs
index a0306514c03..bfce4f717c6 100644
--- a/bridges/bin/rialto-parachain/node/src/chain_spec.rs
+++ b/bridges/bin/rialto-parachain/node/src/chain_spec.rs
@@ -39,7 +39,7 @@ pub type ChainSpec =
 
 /// Helper function to generate a crypto pair from seed
 pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
-	TPublic::Pair::from_string(&format!("//{}", seed), None)
+	TPublic::Pair::from_string(&format!("//{seed}"), None)
 		.expect("static values are valid; qed")
 		.public()
 }
@@ -81,7 +81,7 @@ fn endowed_accounts() -> Vec<AccountId> {
 	let all_authorities = ALL_AUTHORITIES_ACCOUNTS.iter().flat_map(|x| {
 		[
 			get_account_id_from_seed::<sr25519::Public>(x),
-			get_account_id_from_seed::<sr25519::Public>(&format!("{}//stash", x)),
+			get_account_id_from_seed::<sr25519::Public>(&format!("{x}//stash")),
 		]
 	});
 	vec![
diff --git a/bridges/bin/rialto-parachain/node/src/command.rs b/bridges/bin/rialto-parachain/node/src/command.rs
index 533e731b3ac..dd9e95abbe5 100644
--- a/bridges/bin/rialto-parachain/node/src/command.rs
+++ b/bridges/bin/rialto-parachain/node/src/command.rs
@@ -196,7 +196,7 @@ pub fn run() -> Result<()> {
 					&polkadot_cli,
 					config.tokio_handle.clone(),
 				)
-				.map_err(|err| format!("Relay chain argument error: {}", err))?;
+				.map_err(|err| format!("Relay chain argument error: {err}"))?;
 
 				cmd.run(config, polkadot_config)
 			})
@@ -292,7 +292,7 @@ pub fn run() -> Result<()> {
 				let state_version =
 					RelayChainCli::native_runtime_version(&config.chain_spec).state_version();
 				let block: Block = generate_genesis_block(&*config.chain_spec, state_version)
-					.map_err(|e| format!("{:?}", e))?;
+					.map_err(|e| format!("{e:?}"))?;
 				let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));
 
 				let polkadot_config = SubstrateCli::create_configuration(
@@ -300,7 +300,7 @@ pub fn run() -> Result<()> {
 					&polkadot_cli,
 					config.tokio_handle.clone(),
 				)
-				.map_err(|err| format!("Relay chain argument error: {}", err))?;
+				.map_err(|err| format!("Relay chain argument error: {err}"))?;
 
 				info!("Parachain id: {:?}", id);
 				info!("Parachain Account: {}", parachain_account);
diff --git a/bridges/bin/rialto-parachain/node/src/service.rs b/bridges/bin/rialto-parachain/node/src/service.rs
index f97c2fcd7c4..8d722b3caa6 100644
--- a/bridges/bin/rialto-parachain/node/src/service.rs
+++ b/bridges/bin/rialto-parachain/node/src/service.rs
@@ -443,7 +443,7 @@ pub async fn start_node(
 			use substrate_frame_rpc_system::{System, SystemApiServer};
 
 			let mut io = jsonrpsee::RpcModule::new(());
-			let map_err = |e| sc_service::Error::Other(format!("{}", e));
+			let map_err = |e| sc_service::Error::Other(format!("{e}"));
 			io.merge(System::new(client.clone(), pool, DenyUnsafe::No).into_rpc())
 				.map_err(map_err)?;
 			io.merge(TransactionPayment::new(client).into_rpc()).map_err(map_err)?;
diff --git a/bridges/bin/rialto/node/src/chain_spec.rs b/bridges/bin/rialto/node/src/chain_spec.rs
index ffd7bafaa83..0e9edb38ac0 100644
--- a/bridges/bin/rialto/node/src/chain_spec.rs
+++ b/bridges/bin/rialto/node/src/chain_spec.rs
@@ -57,7 +57,7 @@ pub enum Alternative {
 
 /// Helper function to generate a crypto pair from seed
 pub fn get_from_seed<TPublic: Public>(seed: &str) -> <TPublic::Pair as Pair>::Public {
-	TPublic::Pair::from_string(&format!("//{}", seed), None)
+	TPublic::Pair::from_string(&format!("//{seed}"), None)
 		.expect("static values are valid; qed")
 		.public()
 }
@@ -156,7 +156,7 @@ fn endowed_accounts() -> Vec<AccountId> {
 	let all_authorities = ALL_AUTHORITIES_ACCOUNTS.iter().flat_map(|x| {
 		[
 			get_account_id_from_seed::<sr25519::Public>(x),
-			get_account_id_from_seed::<sr25519::Public>(&format!("{}//stash", x)),
+			get_account_id_from_seed::<sr25519::Public>(&format!("{x}//stash")),
 		]
 	});
 	vec![
diff --git a/bridges/bin/rialto/node/src/command.rs b/bridges/bin/rialto/node/src/command.rs
index 852acb59553..8286444d3ea 100644
--- a/bridges/bin/rialto/node/src/command.rs
+++ b/bridges/bin/rialto/node/src/command.rs
@@ -57,7 +57,7 @@ impl SubstrateCli for Cli {
 			match id {
 				"" | "dev" => crate::chain_spec::Alternative::Development,
 				"local" => crate::chain_spec::Alternative::LocalTestnet,
-				_ => return Err(format!("Unsupported chain specification: {}", id)),
+				_ => return Err(format!("Unsupported chain specification: {id}")),
 			}
 			.load(),
 		))
diff --git a/bridges/relays/bin-substrate/src/cli/estimate_fee.rs b/bridges/relays/bin-substrate/src/cli/estimate_fee.rs
index 806df7f01f7..88823eec2f2 100644
--- a/bridges/relays/bin-substrate/src/cli/estimate_fee.rs
+++ b/bridges/relays/bin-substrate/src/cli/estimate_fee.rs
@@ -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(())
 	}
 }
diff --git a/bridges/relays/bin-substrate/src/cli/mod.rs b/bridges/relays/bin-substrate/src/cli/mod.rs
index 42a073bd4f6..2369bb60dda 100644
--- a/bridges/relays/bin-substrate/src/cli/mod.rs
+++ b/bridges/relays/bin-substrate/src/cli/mod.rs
@@ -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();
diff --git a/bridges/relays/bin-substrate/src/cli/resubmit_transactions.rs b/bridges/relays/bin-substrate/src/cli/resubmit_transactions.rs
index ac479986ed8..4481d3fb712 100644
--- a/bridges/relays/bin-substrate/src/cli/resubmit_transactions.rs
+++ b/bridges/relays/bin-substrate/src/cli/resubmit_transactions.rs
@@ -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;
 
diff --git a/bridges/relays/client-substrate/src/error.rs b/bridges/relays/client-substrate/src/error.rs
index 016ec774beb..4252a5027d4 100644
--- a/bridges/relays/client-substrate/src/error.rs
+++ b/bridges/relays/client-substrate/src/error.rs
@@ -70,7 +70,7 @@ pub enum Error {
 
 impl From<tokio::task::JoinError> for Error {
 	fn from(error: tokio::task::JoinError) -> Self {
-		Error::Custom(format!("Failed to wait tokio task: {}", error))
+		Error::Custom(format!("Failed to wait tokio task: {error}"))
 	}
 }
 
diff --git a/bridges/relays/finality/src/finality_loop.rs b/bridges/relays/finality/src/finality_loop.rs
index 302a038b81e..1ee1a8d9db6 100644
--- a/bridges/relays/finality/src/finality_loop.rs
+++ b/bridges/relays/finality/src/finality_loop.rs
@@ -220,7 +220,7 @@ impl<Tracker: TransactionTracker, Number: Debug + PartialOrd> Transaction<Tracke
 				target_client
 					.best_finalized_source_block_id()
 					.await
-					.map_err(|e| format!("failed to read best block from target node: {:?}", e))
+					.map_err(|e| format!("failed to read best block from target node: {e:?}"))
 					.and_then(|best_id_at_target| {
 						if self.submitted_header_number > best_id_at_target.0 {
 							return Err(format!(
diff --git a/bridges/relays/finality/src/sync_loop_metrics.rs b/bridges/relays/finality/src/sync_loop_metrics.rs
index fcfdbbd99f1..ae73bbedc4f 100644
--- a/bridges/relays/finality/src/sync_loop_metrics.rs
+++ b/bridges/relays/finality/src/sync_loop_metrics.rs
@@ -39,15 +39,15 @@ impl SyncLoopMetrics {
 	) -> Result<Self, PrometheusError> {
 		Ok(SyncLoopMetrics {
 			best_source_block_number: IntGauge::new(
-				metric_name(prefix, &format!("best_{}_block_number", at_source_chain_label)),
-				format!("Best block number at the {}", at_source_chain_label),
+				metric_name(prefix, &format!("best_{at_source_chain_label}_block_number")),
+				format!("Best block number at the {at_source_chain_label}"),
 			)?,
 			best_target_block_number: IntGauge::new(
-				metric_name(prefix, &format!("best_{}_block_number", at_target_chain_label)),
-				format!("Best block number at the {}", at_target_chain_label),
+				metric_name(prefix, &format!("best_{at_target_chain_label}_block_number")),
+				format!("Best block number at the {at_target_chain_label}"),
 			)?,
 			using_different_forks: IntGauge::new(
-				metric_name(prefix, &format!("is_{}_and_{}_using_different_forks", at_source_chain_label, at_target_chain_label)),
+				metric_name(prefix, &format!("is_{at_source_chain_label}_and_{at_target_chain_label}_using_different_forks")),
 				"Whether the best finalized source block at target node is different (value 1) from the \
 				corresponding block at the source node",
 			)?,
diff --git a/bridges/relays/lib-substrate-relay/src/finality/source.rs b/bridges/relays/lib-substrate-relay/src/finality/source.rs
index 199de368137..430a83eb43c 100644
--- a/bridges/relays/lib-substrate-relay/src/finality/source.rs
+++ b/bridges/relays/lib-substrate-relay/src/finality/source.rs
@@ -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
 						},
 					};
diff --git a/bridges/relays/lib-substrate-relay/src/helpers.rs b/bridges/relays/lib-substrate-relay/src/helpers.rs
index 80359b1c2a9..0b824708a89 100644
--- a/bridges/relays/lib-substrate-relay/src/helpers.rs
+++ b/bridges/relays/lib-substrate-relay/src/helpers.rs
@@ -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()),
 	)
diff --git a/bridges/relays/lib-substrate-relay/src/lib.rs b/bridges/relays/lib-substrate-relay/src/lib.rs
index f4f1aae9d29..86e652716f6 100644
--- a/bridges/relays/lib-substrate-relay/src/lib.rs
+++ b/bridges/relays/lib-substrate-relay/src/lib.rs
@@ -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")
 			},
 		}
 	}
diff --git a/bridges/relays/lib-substrate-relay/src/on_demand/headers.rs b/bridges/relays/lib-substrate-relay/src/on_demand/headers.rs
index 09e7a41a0c7..87f1e012cc5 100644
--- a/bridges/relays/lib-substrate-relay/src/on_demand/headers.rs
+++ b/bridges/relays/lib-substrate-relay/src/on_demand/headers.rs
@@ -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(),
diff --git a/bridges/relays/messages/src/message_race_loop.rs b/bridges/relays/messages/src/message_race_loop.rs
index 15308f93032..4f59b635ae6 100644
--- a/bridges/relays/messages/src/message_race_loop.rs
+++ b/bridges/relays/messages/src/message_race_loop.rs
@@ -425,7 +425,7 @@ pub async fn run<P: MessageRace, SC: SourceClient<P>, TC: TargetClient<P>>(
 						// nonce at the target node.
 						race_target.nonces(at_block, false)
 							.await
-							.map_err(|e| format!("failed to read nonces from target node: {:?}", e))
+							.map_err(|e| format!("failed to read nonces from target node: {e:?}"))
 							.and_then(|(_, nonces_at_target)| {
 								if nonces_at_target.latest_nonce < *nonces_submitted.end() {
 									Err(format!(
diff --git a/bridges/relays/utils/src/initialize.rs b/bridges/relays/utils/src/initialize.rs
index ad69a766e62..8224c1803ad 100644
--- a/bridges/relays/utils/src/initialize.rs
+++ b/bridges/relays/utils/src/initialize.rs
@@ -68,7 +68,7 @@ pub fn initialize_logger(with_timestamp: bool) {
 			let log_level = color_level(record.level());
 			let log_target = color_target(record.target());
 
-			writeln!(buf, "{}{} {} {}", loop_name_prefix(), log_level, log_target, record.args(),)
+			writeln!(buf, "{}{log_level} {log_target} {}", loop_name_prefix(), record.args(),)
 		});
 	}
 
@@ -92,7 +92,7 @@ fn loop_name_prefix() -> String {
 			if loop_name.is_empty() {
 				String::new()
 			} else {
-				format!("[{}] ", loop_name)
+				format!("[{loop_name}] ")
 			}
 		})
 		.unwrap_or_else(|_| String::new())
@@ -105,8 +105,8 @@ enum Either<A, B> {
 impl<A: Display, B: Display> Display for Either<A, B> {
 	fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
 		match self {
-			Self::Left(a) => write!(fmt, "{}", a),
-			Self::Right(b) => write!(fmt, "{}", b),
+			Self::Left(a) => write!(fmt, "{a}"),
+			Self::Right(b) => write!(fmt, "{b}"),
 		}
 	}
 }
diff --git a/bridges/relays/utils/src/lib.rs b/bridges/relays/utils/src/lib.rs
index eb3d8ec7525..42bf86ebf5b 100644
--- a/bridges/relays/utils/src/lib.rs
+++ b/bridges/relays/utils/src/lib.rs
@@ -189,12 +189,12 @@ pub fn format_ids<Id: std::fmt::Debug>(mut ids: impl ExactSizeIterator<Item = Id
 		2 => {
 			let id0 = ids.next().expect(NTH_PROOF);
 			let id1 = ids.next().expect(NTH_PROOF);
-			format!("[{:?}, {:?}]", id0, id1)
+			format!("[{id0:?}, {id1:?}]")
 		},
 		len => {
 			let id0 = ids.next().expect(NTH_PROOF);
 			let id_last = ids.last().expect(NTH_PROOF);
-			format!("{}:[{:?} ... {:?}]", len, id0, id_last)
+			format!("{len}:[{id0:?} ... {id_last:?}]")
 		},
 	}
 }
diff --git a/bridges/relays/utils/src/metrics.rs b/bridges/relays/utils/src/metrics.rs
index b5225fca0e0..fa7a79a71c1 100644
--- a/bridges/relays/utils/src/metrics.rs
+++ b/bridges/relays/utils/src/metrics.rs
@@ -121,7 +121,7 @@ impl From<Option<MetricsAddress>> for MetricsParams {
 /// Returns metric name optionally prefixed with given prefix.
 pub fn metric_name(prefix: Option<&str>, name: &str) -> String {
 	if let Some(prefix) = prefix {
-		format!("{}_{}", prefix, name)
+		format!("{prefix}_{name}")
 	} else {
 		name.into()
 	}
-- 
GitLab