(cont.) Take num_to_exclude into consideration for bulk exclusion

This commit is contained in:
RunasSudo 2021-09-05 23:13:37 +10:00
parent 09c4a375a7
commit 18c974117e
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -1164,7 +1164,7 @@ fn can_bulk_elect<N: Number>(state: &CountState<N>, num_to_exclude: usize) -> bo
})
.count();
if num_hopefuls > 0 && state.num_elected + num_hopefuls - num_to_exclude <= state.election.seats {
if num_hopefuls - num_to_exclude > 0 && state.num_elected + num_hopefuls - num_to_exclude <= state.election.seats {
return true;
}
return false;