pub(crate) fn range( range: impl RangeBounds<usize>, len: usize, ) -> (usize, usize)
Performs bounds checking of a range.
This is a spiritual copy of [core::slice::index::range] because that function is currently unstable.