pub fn only_or_err<T>(slice: &[T]) -> Result<&T>
Returns the first (and only) element in a slice, or an error
slice
The first element, or an error