Disallow --no-immediate-elect with --quota-mode ers97/ers76
This commit is contained in:
parent
631d4e770a
commit
131d32c781
|
@ -248,9 +248,19 @@ impl STVOptions {
|
|||
return Err(STVError::InvalidOptions("--subtract-nontransferable requires --transferable-only"));
|
||||
}
|
||||
}
|
||||
if !self.immediate_elect && self.surplus_order != SurplusOrder::BySize {
|
||||
// Invalid because there is no other metric to determine which surplus to distribute
|
||||
return Err(STVError::InvalidOptions("--no-immediate-elect requires --surplus-order by_size"));
|
||||
if !self.immediate_elect {
|
||||
if self.surplus_order != SurplusOrder::BySize {
|
||||
// Invalid because there is no other metric to determine which surplus to distribute
|
||||
return Err(STVError::InvalidOptions("--no-immediate-elect requires --surplus-order by_size"));
|
||||
}
|
||||
if self.quota_mode == QuotaMode::ERS97 {
|
||||
// Invalid because candidates meeting the VRE never have surpluses distributed
|
||||
return Err(STVError::InvalidOptions("--no-immediate-elect is incompatible with --quota-mode ers97"));
|
||||
}
|
||||
if self.quota_mode == QuotaMode::ERS76 {
|
||||
// Invalid because candidates meeting the VRE never have surpluses distributed
|
||||
return Err(STVError::InvalidOptions("--no-immediate-elect is incompatible with --quota-mode ers76"));
|
||||
}
|
||||
}
|
||||
if self.min_threshold != "0" && self.defer_surpluses {
|
||||
// TODO: NYI
|
||||
|
|
Loading…
Reference in New Issue