Skip to content

Commit 6396239

Browse files
svyatonikbkchr
authored andcommitted
cargo +nightly fmt --all (#1192)
1 parent 5842968 commit 6396239

File tree

12 files changed

+30
-29
lines changed

12 files changed

+30
-29
lines changed

bridges/bin/millau/runtime/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ pub use frame_support::{
6565

6666
pub use frame_system::Call as SystemCall;
6767
pub use pallet_balances::Call as BalancesCall;
68-
pub use pallet_bridge_grandpa::{
69-
Call as BridgeGrandpaRialtoCall, Call as BridgeGrandpaWestendCall,
70-
};
68+
pub use pallet_bridge_grandpa::Call as BridgeGrandpaCall;
7169
pub use pallet_bridge_messages::Call as MessagesCall;
7270
pub use pallet_sudo::Call as SudoCall;
7371
pub use pallet_timestamp::Call as TimestampCall;

bridges/modules/ethereum/src/validators.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ impl<'a> Validators<'a> {
132132
}
133133

134134
let receipts = receipts.ok_or(Error::MissingTransactionsReceipts)?;
135+
#[allow(clippy::question_mark)]
135136
if header.check_receipts_root(&receipts).is_err() {
136137
return Err(Error::TransactionsReceiptsMismatch)
137138
}

bridges/modules/ethereum/src/verification.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ pub fn accept_aura_header_into_pool<S: Storage, CT: ChainTime>(
152152
// the heaviest, but rare operation - we do not want invalid receipts in the pool
153153
if let Some(receipts) = receipts {
154154
log::trace!(target: "runtime", "Got receipts! {:?}", receipts);
155+
#[allow(clippy::question_mark)]
155156
if header.check_receipts_root(receipts).is_err() {
156157
return Err(Error::TransactionsReceiptsMismatch)
157158
}

bridges/modules/token-swap/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ pub mod pallet {
226226
/// Violating rule#1 will lead to losing your `source_balance_at_this_chain` tokens.
227227
/// Violating other rules will lead to losing message fees for this and other transactions +
228228
/// losing fees for message transfer.
229+
#[allow(clippy::boxed_local)]
229230
#[pallet::weight(
230231
T::WeightInfo::create_swap()
231232
.saturating_add(T::WeightInfo::send_message_weight(

bridges/relays/bin-substrate/src/chains/mod.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,11 @@ mod rococo_tests {
287287
Box::new(header.clone()),
288288
justification.clone(),
289289
);
290-
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
291-
Box::new(header),
292-
justification,
293-
);
290+
let expected =
291+
millau_runtime::BridgeGrandpaCall::<millau_runtime::Runtime>::submit_finality_proof(
292+
Box::new(header),
293+
justification,
294+
);
294295

295296
// when
296297
let actual_encoded = actual.encode();
@@ -335,10 +336,11 @@ mod westend_tests {
335336
header.clone(),
336337
justification.clone(),
337338
);
338-
let expected = millau_runtime::BridgeGrandpaRialtoCall::<millau_runtime::Runtime>::submit_finality_proof(
339-
Box::new(header),
340-
justification,
341-
);
339+
let expected =
340+
millau_runtime::BridgeGrandpaCall::<millau_runtime::Runtime>::submit_finality_proof(
341+
Box::new(header),
342+
justification,
343+
);
342344

343345
// when
344346
let actual_encoded = actual.encode();

bridges/relays/bin-substrate/src/chains/rialto_headers_to_millau.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl SubstrateFinalitySyncPipeline for RialtoFinalityToMillau {
6666
header: RialtoSyncHeader,
6767
proof: GrandpaJustification<bp_rialto::Header>,
6868
) -> Bytes {
69-
let call = millau_runtime::BridgeGrandpaRialtoCall::<
69+
let call = millau_runtime::BridgeGrandpaCall::<
7070
millau_runtime::Runtime,
7171
millau_runtime::RialtoGrandpaInstance,
7272
>::submit_finality_proof(Box::new(header.into_inner()), proof)

bridges/relays/bin-substrate/src/chains/westend_headers_to_millau.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl SubstrateFinalitySyncPipeline for WestendFinalityToMillau {
7474
header: WestendSyncHeader,
7575
proof: GrandpaJustification<bp_westend::Header>,
7676
) -> Bytes {
77-
let call = millau_runtime::BridgeGrandpaWestendCall::<
77+
let call = millau_runtime::BridgeGrandpaCall::<
7878
millau_runtime::Runtime,
7979
millau_runtime::WestendGrandpaInstance,
8080
>::submit_finality_proof(Box::new(header.into_inner()), proof)

bridges/relays/bin-substrate/src/cli/init_bridge.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ macro_rules! select_bridge {
7575
fn encode_init_bridge(
7676
init_data: InitializationData<<Source as ChainBase>::Header>,
7777
) -> <Target as Chain>::Call {
78-
let initialize_call = millau_runtime::BridgeGrandpaRialtoCall::<
78+
let initialize_call = millau_runtime::BridgeGrandpaCall::<
7979
millau_runtime::Runtime,
8080
millau_runtime::RialtoGrandpaInstance,
8181
>::initialize(init_data);
@@ -95,7 +95,7 @@ macro_rules! select_bridge {
9595
// our deployments may fail, because we need to initialize both Rialto -> Millau
9696
// and Westend -> Millau bridge. => since there's single possible sudo account,
9797
// one of transaction may fail with duplicate nonce error
98-
millau_runtime::BridgeGrandpaWestendCall::<
98+
millau_runtime::BridgeGrandpaCall::<
9999
millau_runtime::Runtime,
100100
millau_runtime::WestendGrandpaInstance,
101101
>::initialize(init_data)

bridges/relays/bin-substrate/src/cli/register_parachain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl RegisterParachain {
112112

113113
// step 1: reserve a parachain id
114114
let relay_genesis_hash = *relay_client.genesis_hash();
115-
let relay_sudo_account: AccountIdOf<Relaychain> = relay_sign.public().clone().into();
115+
let relay_sudo_account: AccountIdOf<Relaychain> = relay_sign.public().into();
116116
let reserve_parachain_id_call: CallOf<Relaychain> = ParaRegistrarCall::reserve().into();
117117
let reserve_parachain_signer = relay_sign.clone();
118118
wait_until_transaction_is_finalized::<Relaychain>(

bridges/relays/bin-substrate/src/cli/resubmit_transactions.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ impl ResubmitTransactions {
134134
transaction: None,
135135
resubmitted: 0,
136136
stalled_for: Zero::zero(),
137-
stalled_for_limit: self.stalled_blocks.into(),
138-
tip_step: self.tip_step.cast().into(),
139-
tip_limit: self.tip_limit.cast().into(),
137+
stalled_for_limit: self.stalled_blocks as _,
138+
tip_step: self.tip_step.cast() as _,
139+
tip_limit: self.tip_limit.cast() as _,
140140
},
141141
)
142142
})

0 commit comments

Comments
 (0)