Function difft::display::context::add_ends

source ·
fn add_ends(
    matched_lines: &[(Option<LineNumber>, Option<LineNumber>)],
    lhs_lines: &[&str],
    rhs_lines: &[&str]
) -> Vec<(Option<LineNumber>, Option<LineNumber>)>
Expand description

Extend matched_lines to include the leading and trailing lines in the file.

If the leading or trailing lines are blank, we won’t have any MatchedPos values corresponding with those lines.