Skip to content

Commit

Permalink
Add doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Oct 15, 2024
1 parent 663590a commit 2dd4f7e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/line_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,12 @@ fn line_len_in_bytes(line: &str) -> usize {
}
}

// TODO: Prefer src/opposite_src nomenclature as this function is called from both sides.
/// Build a vec of MatchedPos, performing a textual diff. Match up
/// unchanged lines, and match up unchanged words within novel lines.
///
/// The resulting vec only has novel items from the LHS. Callers
/// should do `change_positions(rhs_src, lhs_src)` to obtain
/// novel MatchedPos values for the RHS.
pub(crate) fn change_positions(lhs_src: &str, rhs_src: &str) -> Vec<MatchedPos> {
// TODO: If either side is "", don't split each line by words
// pointlessly. This is common for file additions/removals.
Expand Down

0 comments on commit 2dd4f7e

Please sign in to comment.