gix_chunk::range

Function into_usize_or_panic

source
pub fn into_usize_or_panic(range: Range<Offset>) -> Range<usize>
Expand description

Similar to into_usize(), but panics assuming that the memory map couldn’t be created if offsets stored are too high.

This is only true for correctly formed files, as it’s entirely possible to provide out of bounds offsets which are checked for separately - we wouldn’t be here if that was the case.