Skip to main content

get_pair

Function get_pair 

Source
pub(crate) fn get_pair<T>(slice: &[T], idx: usize) -> Result<&[T; 2], ReadError>
Expand description

Helper to retrieve a pair of items from a slice, returning an error if the second index overflows or if either index is out of bounds.