aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunasSudo <runassudo@yingtongli.me>2021-10-26 00:55:49 +1100
committerRunasSudo <runassudo@yingtongli.me>2021-10-26 00:55:49 +1100
commit69bc30b333c7800f43de1937fede35360fadf226 (patch)
tree37f88484f64622d960b048fe249528851d33dc67
parent0c97755813f58de1d96ba8797be63c22d2b3c6d8 (diff)
Downgrade some FIXMEs
-rw-r--r--src/cli/stv.rs6
-rw-r--r--src/stv/meek.rs2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/cli/stv.rs b/src/cli/stv.rs
index 0f7312a..4f5ea7d 100644
--- a/src/cli/stv.rs
+++ b/src/cli/stv.rs
@@ -446,7 +446,7 @@ where
}
// Subtract this from progressive NTs
- // FIXME: May fail to round correctly with minivoters
+ // TODO: May fail to round correctly with minivoters
let invalid_votes = state.exhausted.votes.clone();
let valid_votes = total_ballots - &invalid_votes;
@@ -465,11 +465,11 @@ where
for (i, candidate) in election.candidates.iter().enumerate() {
let count_card = &state.candidates[candidate];
stage_results[3 + i].push(format!(r#""{}""#, candidate.name));
- stage_results[3 + i].push(format!(r#"{:.0}"#, count_card.votes)); // FIXME: May fail to round correctly with minivoters
+ stage_results[3 + i].push(format!(r#"{:.0}"#, count_card.votes)); // TODO: May fail to round correctly with minivoters
}
stage_results[3 + election.candidates.len()].push(String::from(r#""Non-transferable""#));
- stage_results[3 + election.candidates.len()].push(String::new()); // FIXME: May fail to round correctly with minivoters
+ stage_results[3 + election.candidates.len()].push(String::new()); // TODO: May fail to round correctly with minivoters
stage_results[4 + election.candidates.len()].push(String::from(r#""Totals""#));
stage_results[4 + election.candidates.len()].push(format!(r#"{:.0}"#, valid_votes));
diff --git a/src/stv/meek.rs b/src/stv/meek.rs
index b0fe80c..aaf3f34 100644
--- a/src/stv/meek.rs
+++ b/src/stv/meek.rs
@@ -170,8 +170,6 @@ where
tree.descend_tree(&election.candidates);
}
- // FIXME: Possibility of infinite loop if malformed inputs?
-
// Credit votes at this level
for (candidate, cand_tree) in tree.next_preferences.as_mut().unwrap().as_mut().iter_mut() {
let count_card = candidates.get_mut(candidate).unwrap();
Contact (issues, pull requests, etc.) at git@yingtongli.me. Generated by cgit.