Skip to content

Commit 5e76664

Browse files
authored
chore(pallet-tft-bridge): remove rustc 1.77 warnings (#1016)
1 parent cd15cc2 commit 5e76664

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ impl<T: Config> Pallet<T> {
2626

2727
// transfer new amount to target
2828
let amount_as_balance = BalanceOf::<T>::saturated_from(new_amount);
29-
T::Currency::deposit_creating(&tx.target, amount_as_balance);
29+
let _ = T::Currency::deposit_creating(&tx.target, amount_as_balance);
3030
// transfer deposit fee to fee wallet
3131
let deposit_fee_b = BalanceOf::<T>::saturated_from(deposit_fee);
3232

3333
if let Some(fee_account) = FeeAccount::<T>::get() {
34-
T::Currency::deposit_creating(&fee_account, deposit_fee_b);
34+
let _ = T::Currency::deposit_creating(&fee_account, deposit_fee_b);
3535
}
3636

3737
// Remove tx from storage
@@ -78,7 +78,7 @@ impl<T: Config> Pallet<T> {
7878

7979
// transfer withdraw fee to fee wallet
8080
if let Some(fee_account) = FeeAccount::<T>::get() {
81-
T::Currency::deposit_creating(&fee_account, withdraw_fee_b);
81+
let _ = T::Currency::deposit_creating(&fee_account, withdraw_fee_b);
8282
}
8383

8484
// increment burn transaction id
@@ -240,9 +240,11 @@ impl<T: Config> Pallet<T> {
240240
Error::<T>::BurnTransactionAlreadyExecuted
241241
);
242242

243-
let Some(mut burn_tx) = BurnTransactions::<T>::get(tx_id) else {return Err(DispatchErrorWithPostInfo::from(
244-
Error::<T>::BurnTransactionNotExists,
245-
));};
243+
let Some(mut burn_tx) = BurnTransactions::<T>::get(tx_id) else {
244+
return Err(DispatchErrorWithPostInfo::from(
245+
Error::<T>::BurnTransactionNotExists,
246+
));
247+
};
246248

247249
ensure!(
248250
BurnTransactions::<T>::contains_key(tx_id),
@@ -286,9 +288,11 @@ impl<T: Config> Pallet<T> {
286288
stellar_pub_key: Vec<u8>,
287289
sequence_number: u64,
288290
) -> DispatchResultWithPostInfo {
289-
let Some(mut tx) = BurnTransactions::<T>::get(&tx_id) else {return Err(DispatchErrorWithPostInfo::from(
290-
Error::<T>::BurnTransactionNotExists,
291-
));};
291+
let Some(mut tx) = BurnTransactions::<T>::get(&tx_id) else {
292+
return Err(DispatchErrorWithPostInfo::from(
293+
Error::<T>::BurnTransactionNotExists,
294+
));
295+
};
292296

293297
let validators = Validators::<T>::get();
294298
if tx.signatures.len() == (validators.len() / 2) + 1 {
@@ -346,9 +350,11 @@ impl<T: Config> Pallet<T> {
346350
Error::<T>::BurnTransactionNotExists
347351
);
348352

349-
let Some(tx) = BurnTransactions::<T>::get(tx_id) else {return Err(DispatchErrorWithPostInfo::from(
350-
Error::<T>::BurnTransactionNotExists,
351-
));};
353+
let Some(tx) = BurnTransactions::<T>::get(tx_id) else {
354+
return Err(DispatchErrorWithPostInfo::from(
355+
Error::<T>::BurnTransactionNotExists,
356+
));
357+
};
352358

353359
BurnTransactions::<T>::remove(tx_id);
354360
ExecutedBurnTransactions::<T>::insert(tx_id, &tx);

0 commit comments

Comments
 (0)