diff options
-rw-r--r-- | src/align.rs | 7 | ||||
-rw-r--r-- | src/edits.rs | 6 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/align.rs b/src/align.rs index 6e9b5af4..2a30afb4 100644 --- a/src/align.rs +++ b/src/align.rs @@ -95,8 +95,11 @@ impl<'a> Alignment<'a> { }, ]; let index = self.index(i, j); - self.table[index] = - (*candidates.iter().min_by_key(|cell| cell.cost).unwrap()).clone(); + self.table[index] = candidates + .iter() + .min_by_key(|cell| cell.cost) + .unwrap() + .clone(); } } } diff --git a/src/edits.rs b/src/edits.rs index 38bec5c9..0c2e4894 100644 --- a/src/edits.rs +++ b/src/edits.rs @@ -162,15 +162,15 @@ where align::Operation::NoOp => { let minus_section = minus_section(n); let n_d = distance_contribution(minus_section); - d_denom += n_d; // TODO 2x ? + d_denom += n_d; annotated_minus_line.push((noop_deletion, minus_section)); annotated_plus_line.push((noop_insertion, plus_section(n))); } align::Operation::Substitution => { let minus_section = minus_section(n); let n_d = distance_contribution(minus_section); - d_denom += n_d; // TODO 2x ? - d_numer += n_d; // TODO 2x? + d_denom += n_d; + d_numer += n_d; annotated_minus_line.push((deletion, minus_section)); annotated_plus_line.push((insertion, plus_section(n))); } |