Skip to content

Commit d0649dc

Browse files
committed
fix clippy collapsible match
1 parent 88f6b57 commit d0649dc

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

pallets/subtensor/src/lib.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2403,18 +2403,17 @@ where
24032403
_len: usize,
24042404
) -> TransactionValidity {
24052405
// Check if the call is one of the balance transfer types we want to reject
2406-
if let Some(balances_call) = call.is_sub_type() {
2407-
match balances_call {
2408-
BalancesCall::transfer_allow_death { .. }
2409-
| BalancesCall::transfer_keep_alive { .. }
2410-
| BalancesCall::transfer_all { .. } => {
2411-
if Pallet::<T>::coldkey_in_arbitration(who) {
2412-
return Err(TransactionValidityError::Invalid(InvalidTransaction::Call));
2413-
}
2406+
match call.is_sub_type() {
2407+
Some(BalancesCall::transfer_allow_death { .. })
2408+
| Some(BalancesCall::transfer_keep_alive { .. })
2409+
| Some(BalancesCall::transfer_all { .. }) => {
2410+
if Pallet::<T>::coldkey_in_arbitration(who) {
2411+
return Err(TransactionValidityError::Invalid(InvalidTransaction::Call));
24142412
}
2415-
_ => {} // Other Balances calls are allowed
24162413
}
2414+
_ => {} // Other Balances calls are allowed
24172415
}
2416+
24182417
match call.is_sub_type() {
24192418
Some(Call::commit_weights { netuid, .. }) => {
24202419
if Self::check_weights_min_stake(who) {

0 commit comments

Comments
 (0)