Skip to content

Commit

Permalink
fix clippy collapsible match
Browse files Browse the repository at this point in the history
  • Loading branch information
orriin committed Aug 6, 2024
1 parent 88f6b57 commit d0649dc
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions pallets/subtensor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2403,18 +2403,17 @@ where
_len: usize,
) -> TransactionValidity {
// Check if the call is one of the balance transfer types we want to reject
if let Some(balances_call) = call.is_sub_type() {
match balances_call {
BalancesCall::transfer_allow_death { .. }
| BalancesCall::transfer_keep_alive { .. }
| BalancesCall::transfer_all { .. } => {
if Pallet::<T>::coldkey_in_arbitration(who) {
return Err(TransactionValidityError::Invalid(InvalidTransaction::Call));
}
match call.is_sub_type() {
Some(BalancesCall::transfer_allow_death { .. })
| Some(BalancesCall::transfer_keep_alive { .. })
| Some(BalancesCall::transfer_all { .. }) => {
if Pallet::<T>::coldkey_in_arbitration(who) {
return Err(TransactionValidityError::Invalid(InvalidTransaction::Call));
}
_ => {} // Other Balances calls are allowed
}
_ => {} // Other Balances calls are allowed
}

match call.is_sub_type() {
Some(Call::commit_weights { netuid, .. }) => {
if Self::check_weights_min_stake(who) {
Expand Down

0 comments on commit d0649dc

Please sign in to comment.