difft::display::hunks

Function matched_novel_lines

Source
fn matched_novel_lines(
    lhs_mps: &[MatchedPos],
    rhs_mps: &[MatchedPos],
) -> Vec<(Option<LineNumber>, Option<LineNumber>)>
Expand description

Find all the lines containing novel items, so these lines need to be displayed in the diff.

If they have a corresponding opposite line (e.g. the line contains both novel and unchanged tokens), include the opposite line in the tuple.