Skip to content

Commit 8a1dfb0

Browse files
committed
use let Some instead of match
1 parent df200e9 commit 8a1dfb0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

stacks-signer/src/v0/signer_state.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -687,17 +687,16 @@ impl LocalStateMachine {
687687
match new_miner {
688688
StateMachineUpdateMinerState::ActiveMiner {
689689
current_miner_pkh, ..
690-
} => match sortition_state {
691-
Some(sortition_state) => {
690+
} => {
691+
if let Some(sortition_state) = sortition_state {
692692
// if there is a mismatch between the new_miner ad the current sortition view, mark the current miner as invalid
693693
if current_miner_pkh != sortition_state.cur_sortition.miner_pkh {
694694
sortition_state.cur_sortition.miner_status =
695695
SortitionMinerStatus::InvalidatedBeforeFirstBlock
696696
}
697697
}
698-
None => (),
699-
},
700-
StateMachineUpdateMinerState::NoValidMiner => {}
698+
}
699+
StateMachineUpdateMinerState::NoValidMiner => (),
701700
}
702701
}
703702
}

0 commit comments

Comments
 (0)