Show updated keep value after exclusion when --meek-nz-exclusion

This commit is contained in:
RunasSudo 2021-06-20 01:51:34 +10:00
parent 90beffa9ff
commit 290ddad634
No known key found for this signature in database
GPG Key ID: 7234E476BF21C61A

View File

@ -368,6 +368,15 @@ where
})
.collect();
recompute_keep_values(state, opts, &has_surplus);
let kv_str = state.election.candidates.iter()
.map(|c| (c, state.candidates.get(c).unwrap()))
.filter(|(_, cc)| cc.state == CandidateState::Elected)
.sorted_unstable_by(|a, b| a.1.order_elected.cmp(&b.1.order_elected))
.map(|(c, cc)| format!("{} ({:.dps2$})", c.name, cc.keep_value.as_ref().unwrap(), dps2=max(opts.pp_decimals, 2)))
.join(", ");
state.logger.log_literal(format!("Keep values of elected candidates are: {}.", kv_str));
}
// Used to give bulk excluded candidate the same order_elected