From 69bc30b333c7800f43de1937fede35360fadf226 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Tue, 26 Oct 2021 00:55:49 +1100 Subject: [PATCH] Downgrade some FIXMEs --- src/cli/stv.rs | 6 +++--- src/stv/meek.rs | 2 -- 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();