pub(crate) fn get_pair<T>(slice: &[T], idx: usize) -> Result<&[T; 2], ReadError>
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.