Fix error with --meek-nz-exclusion, etc. on CLI

This commit is contained in:
RunasSudo 2021-06-22 14:29:33 +10:00
parent 290ddad634
commit 2e034d06c8
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -130,7 +130,7 @@ struct STV {
transferable_only: bool,
/// Method of exclusions
#[clap(help_heading=Some("STV VARIANTS"), long, possible_values=&["single_stage", "by_value", "parcels_by_order"], default_value="single_stage", value_name="method")]
#[clap(help_heading=Some("STV VARIANTS"), long, possible_values=&["single_stage", "by_value", "parcels_by_order", "wright"], default_value="single_stage", value_name="method")]
exclusion: String,
/// (Meek STV) NZ Meek STV behaviour: Iterate keep values one round before candidate exclusion
@ -220,13 +220,16 @@ where
&cmd_opts.surplus_order,
cmd_opts.transferable_only,
&cmd_opts.exclusion,
cmd_opts.meek_nz_exclusion,
cmd_opts.bulk_exclude,
cmd_opts.defer_surpluses,
cmd_opts.meek_immediate_elect,
cmd_opts.meek_nz_exclusion,
cmd_opts.pp_decimals,
);
// Validate options
stv_opts.validate();
// Describe count
let total_ballots = election.ballots.iter().fold(N::zero(), |acc, b| { acc + &b.orig_value });
print!("Count computed by OpenTally (revision {}). Read {:.0} ballots from \"{}\" for election \"{}\". There are {} candidates for {} vacancies. ", opentally::VERSION, total_ballots, cmd_opts.filename, election.name, election.candidates.len(), election.seats);