Function difft::display::hunks::enforce_increasing
source · fn enforce_increasing(
lines: &[(Option<LineNumber>, Option<LineNumber>)]
) -> Vec<(Option<LineNumber>, Option<LineNumber>)>
Expand description
Given a slice of line pairs that are ordered as far as possible, but may refer to earlier lines, return line pairs that are monotonically increasing. If an earlier line occurs after a later line, replace that line with None.