Downgrade some FIXMEs

This commit is contained in:
RunasSudo 2021-10-26 00:55:49 +11:00
parent 0c97755813
commit 69bc30b333
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
2 changed files with 3 additions and 5 deletions

View File

@ -446,7 +446,7 @@ where
} }
// Subtract this from progressive NTs // 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 invalid_votes = state.exhausted.votes.clone();
let valid_votes = total_ballots - &invalid_votes; let valid_votes = total_ballots - &invalid_votes;
@ -465,11 +465,11 @@ where
for (i, candidate) in election.candidates.iter().enumerate() { for (i, candidate) in election.candidates.iter().enumerate() {
let count_card = &state.candidates[candidate]; let count_card = &state.candidates[candidate];
stage_results[3 + i].push(format!(r#""{}""#, candidate.name)); 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::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(String::from(r#""Totals""#));
stage_results[4 + election.candidates.len()].push(format!(r#"{:.0}"#, valid_votes)); stage_results[4 + election.candidates.len()].push(format!(r#"{:.0}"#, valid_votes));

View File

@ -170,8 +170,6 @@ where
tree.descend_tree(&election.candidates); tree.descend_tree(&election.candidates);
} }
// FIXME: Possibility of infinite loop if malformed inputs?
// Credit votes at this level // Credit votes at this level
for (candidate, cand_tree) in tree.next_preferences.as_mut().unwrap().as_mut().iter_mut() { for (candidate, cand_tree) in tree.next_preferences.as_mut().unwrap().as_mut().iter_mut() {
let count_card = candidates.get_mut(candidate).unwrap(); let count_card = candidates.get_mut(candidate).unwrap();