pub(crate) fn simplify_range( range: impl RangeBounds<usize>, len: usize, ) -> Range<usize>
Normalize arbitrary RangeBounds to a Range
RangeBounds
Range