Fix bug with attempted bulk exclusion during exclusion of doomed candidates
This commit is contained in:
parent
ea8c452737
commit
a2915b034b
|
@ -995,7 +995,8 @@ fn can_bulk_elect<N: Number>(state: &CountState<N>, num_to_exclude: usize) -> bo
|
|||
let num_hopefuls = state.election.candidates.iter()
|
||||
.filter(|c| {
|
||||
let cc = &state.candidates[c];
|
||||
return cc.state == CandidateState::Hopeful || cc.state == CandidateState::Guarded;
|
||||
// Include doomed candidates here as these are included in num_to_exclude and so will later be subtracted
|
||||
return cc.state == CandidateState::Hopeful || cc.state == CandidateState::Guarded || cc.state == CandidateState::Doomed;
|
||||
})
|
||||
.count();
|
||||
|
||||
|
|
Loading…
Reference in New Issue