unchecked_index

Function get_unchecked

Source
pub unsafe fn get_unchecked<T, I>(v: &T, index: I) -> &T::Output
where T: GetUnchecked<I> + ?Sized,
Expand description

Access the element(s) at index, without bounds checks!

Note: Will use debug assertions to check that the index is actually valid. In release mode, debug assertions are off by default.

ยงSafety

The caller must ensure that index is in bounds of the underlying container.