rustdoc::passes::lint::unescaped_backticks

Function clamp_end

Source
fn clamp_end(index: usize, ranges: &[Range<usize>]) -> Option<usize>
Expand description

Decrease the index until it is inside or one past the end of one of the ranges.

The ranges must be sorted for this to work correctly.