diff --git a/bin/millau/node/src/service.rs b/bin/millau/node/src/service.rs index e23e1fa56ca..20662d17bb9 100644 --- a/bin/millau/node/src/service.rs +++ b/bin/millau/node/src/service.rs @@ -199,8 +199,7 @@ pub fn new_full(mut config: Configuration) -> Result Ok(k) => keystore_container.set_remote_keystore(k), Err(e) => return Err(ServiceError::Other(format!( - "Error hooking up remote keystore for {}: {}", - url, e + "Error hooking up remote keystore for {url}: {e}" ))), }; } diff --git a/modules/messages/src/weights_ext.rs b/modules/messages/src/weights_ext.rs index e597ed84cdd..b763ca69024 100644 --- a/modules/messages/src/weights_ext.rs +++ b/modules/messages/src/weights_ext.rs @@ -59,10 +59,7 @@ pub fn ensure_able_to_receive_message( max_incoming_message_proof_size.saturating_add(SIGNED_EXTENSIONS_SIZE); assert!( max_delivery_transaction_size <= max_extrinsic_size, - "Size of maximal message delivery transaction {} + {} is larger than maximal possible transaction size {}", - max_incoming_message_proof_size, - SIGNED_EXTENSIONS_SIZE, - max_extrinsic_size, + "Size of maximal message delivery transaction {max_incoming_message_proof_size} + {SIGNED_EXTENSIONS_SIZE} is larger than maximal possible transaction size {max_extrinsic_size}", ); // verify that we're able to receive proof of maximal-size message with maximal dispatch weight @@ -75,9 +72,7 @@ pub fn ensure_able_to_receive_message( ); assert!( max_delivery_transaction_dispatch_weight.all_lte(max_extrinsic_weight), - "Weight of maximal message delivery transaction + {} is larger than maximal possible transaction weight {}", - max_delivery_transaction_dispatch_weight, - max_extrinsic_weight, + "Weight of maximal message delivery transaction + {max_delivery_transaction_dispatch_weight} is larger than maximal possible transaction weight {max_extrinsic_weight}", ); } @@ -94,10 +89,7 @@ pub fn ensure_able_to_receive_confirmation( max_inbound_lane_data_proof_size_from_peer_chain.saturating_add(SIGNED_EXTENSIONS_SIZE); assert!( max_confirmation_transaction_size <= max_extrinsic_size, - "Size of maximal message delivery confirmation transaction {} + {} is larger than maximal possible transaction size {}", - max_inbound_lane_data_proof_size_from_peer_chain, - SIGNED_EXTENSIONS_SIZE, - max_extrinsic_size, + "Size of maximal message delivery confirmation transaction {max_inbound_lane_data_proof_size_from_peer_chain} + {SIGNED_EXTENSIONS_SIZE} is larger than maximal possible transaction size {max_extrinsic_size}", ); // verify that we're able to reward maximal number of relayers that have delivered maximal @@ -112,9 +104,7 @@ pub fn ensure_able_to_receive_confirmation( ); assert!( max_confirmation_transaction_dispatch_weight.all_lte(max_extrinsic_weight), - "Weight of maximal confirmation transaction {} is larger than maximal possible transaction weight {}", - max_confirmation_transaction_dispatch_weight, - max_extrinsic_weight, + "Weight of maximal confirmation transaction {max_confirmation_transaction_dispatch_weight} is larger than maximal possible transaction weight {max_extrinsic_weight}", ); } diff --git a/primitives/messages/src/lib.rs b/primitives/messages/src/lib.rs index 3a14724f9d6..5e7c2593bff 100644 --- a/primitives/messages/src/lib.rs +++ b/primitives/messages/src/lib.rs @@ -408,11 +408,7 @@ mod tests { let difference = (expected_size.unwrap() as f64 - actual_size as f64).abs(); assert!( difference / (std::cmp::min(actual_size, expected_size.unwrap()) as f64) < 0.1, - "Too large difference between actual ({}) and expected ({:?}) inbound lane data size. Test case: {}+{}", - actual_size, - expected_size, - relayer_entries, - messages_count, + "Too large difference between actual ({actual_size}) and expected ({expected_size:?}) inbound lane data size. Test case: {relayer_entries}+{messages_count}", ); } } diff --git a/primitives/test-utils/src/lib.rs b/primitives/test-utils/src/lib.rs index 186d192014b..e0d06ce9970 100644 --- a/primitives/test-utils/src/lib.rs +++ b/primitives/test-utils/src/lib.rs @@ -308,7 +308,7 @@ mod tests { fn print_xcm(xcm: &VersionedXcm) { println!("-----------------"); - println!("xcm (plain): {:?}", xcm); + println!("xcm (plain): {xcm:?}"); println!("xcm (bytes): {:?}", xcm.encode()); println!("xcm (hex): {:?}", hexdisplay::HexDisplay::from(&xcm.encode())); } diff --git a/relays/lib-substrate-relay/src/messages_source.rs b/relays/lib-substrate-relay/src/messages_source.rs index 57f84eb6bb1..bf3779b3b40 100644 --- a/relays/lib-substrate-relay/src/messages_source.rs +++ b/relays/lib-substrate-relay/src/messages_source.rs @@ -495,8 +495,7 @@ fn validate_out_msgs_details( ) -> Result<(), SubstrateError> { let make_missing_nonce_error = |expected_nonce| { Err(SubstrateError::Custom(format!( - "Missing nonce {} in message_details call result. Expected all nonces from {:?}", - expected_nonce, nonces, + "Missing nonce {expected_nonce} in message_details call result. Expected all nonces from {nonces:?}", ))) }; diff --git a/relays/lib-substrate-relay/src/parachains/source.rs b/relays/lib-substrate-relay/src/parachains/source.rs index 2cae7f1a224..b61b893e5bc 100644 --- a/relays/lib-substrate-relay/src/parachains/source.rs +++ b/relays/lib-substrate-relay/src/parachains/source.rs @@ -147,8 +147,7 @@ where let parachain = ParaId(P::SOURCE_PARACHAIN_PARA_ID); if parachains != [parachain] { return Err(SubstrateError::Custom(format!( - "Trying to prove unexpected parachains {:?}. Expected {:?}", - parachains, parachain, + "Trying to prove unexpected parachains {parachains:?}. Expected {parachain:?}", ))) } @@ -177,8 +176,7 @@ where .transpose()? .ok_or_else(|| { SubstrateError::Custom(format!( - "Failed to read expected parachain {:?} head at {:?}", - parachain, at_block + "Failed to read expected parachain {parachain:?} head at {at_block:?}" )) })?; let parachain_head_hash = parachain_head.hash();