difft::display::hunks

Function next_opposite

Source
fn next_opposite(
    line: LineNumber,
    opposites: &HashMap<LineNumber, FxHashSet<LineNumber>, BuildHasherDefault<FxHasher>>,
    prev_opposite: Option<LineNumber>,
) -> Option<LineNumber>
Expand description

Find the line opposite to line, but after prev_opposite.

Note that there may be multiple lines opposite to line, especially when reformatting causes a single line of code to be split over multiple lines.