Fix error with --meek-nz-exclusion, etc. on CLI
This commit is contained in:
parent
290ddad634
commit
2e034d06c8
@ -130,7 +130,7 @@ struct STV {
|
|||||||
transferable_only: bool,
|
transferable_only: bool,
|
||||||
|
|
||||||
/// Method of exclusions
|
/// 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,
|
exclusion: String,
|
||||||
|
|
||||||
/// (Meek STV) NZ Meek STV behaviour: Iterate keep values one round before candidate exclusion
|
/// (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.surplus_order,
|
||||||
cmd_opts.transferable_only,
|
cmd_opts.transferable_only,
|
||||||
&cmd_opts.exclusion,
|
&cmd_opts.exclusion,
|
||||||
|
cmd_opts.meek_nz_exclusion,
|
||||||
cmd_opts.bulk_exclude,
|
cmd_opts.bulk_exclude,
|
||||||
cmd_opts.defer_surpluses,
|
cmd_opts.defer_surpluses,
|
||||||
cmd_opts.meek_immediate_elect,
|
cmd_opts.meek_immediate_elect,
|
||||||
cmd_opts.meek_nz_exclusion,
|
|
||||||
cmd_opts.pp_decimals,
|
cmd_opts.pp_decimals,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Validate options
|
||||||
|
stv_opts.validate();
|
||||||
|
|
||||||
// Describe count
|
// Describe count
|
||||||
let total_ballots = election.ballots.iter().fold(N::zero(), |acc, b| { acc + &b.orig_value });
|
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);
|
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user