message: Split h5check() into h5check() and is_err_code()
diff: @@ -289,14 +289,22 @@ impl From<ShapeError> for Error {
  }
  }
  -pub fn h5check<T>(value: T) -> Result<T>
  +pub(crate) fn is_err_code<T>(value: T) -> bool
  where
  - T: Integer + Zero + Bounded,
  + T: Integer + Zero + Bounded + Copy,
  {
  - let maybe_error =
  - if T::min_value() < T::zero() { value < T::zero() } else { value == T::zero() };
  + if T::min_value() < T::zero() {
  + value < T::zero()
  + } else {
  + value == T::zero()
  + }
  +}
  - if maybe_error {
  +pub fn h5check<T>(value: T) -> Result<T>
  +where
  + T: Integer + Zero + Bounded + Copy,
  +{
  + if is_err_code(value) {
  Error::query().map_or_else(|| Ok(value), Err)
  } else {
  Ok(value)
  