pub fn unwrap_all<T, F: Into<AnyhowError> + Display>(
    results: impl Iterator<Item = Result<T, F>>,
  ) -> (Vec<T>, Option<Self>) {
    let mut result = vec![];
    let mut errors = ErrorGroup::new(None);
    for item in results {
      match item {
        Ok(x) => result.push(x),
        Err(err) => errors.append(err),
      }
    }

    match errors.len() {
      0 => (result, None),
      _ => (result, Some(errors)),
    }
  }
/// Unwrap a list of results, splitting it into unwrapped values and an optional flattened error
///
/// THINK: Should there al
Unwrap a list of results, splitting it into unwrapped values and an optional flattened error
THINK: Should there al
Unwrap a list of results splitting it into unwrapped values and an optional flattened error THINK : Should there al
pub fn unwrap_all<T, F: Into<AnyhowError> + Display>(
    results: impl Iterator<Item = Result<T, F>>,
  ) -> (Vec<T>, Option<Self>) {
    let mut result = vec![];
    let mut errors = ErrorGroup::new(None);
    for item in results {
      match item {
        Ok(x) => result.push(x),
        Err(err) => errors.append(err),
      }
    }
    match errors.len() {
      0 => (result, None),
      _ => (result, Some(errors)),
    }
  }
pub fn unwrap_all < T , F : Into < AnyhowError > + Display > ( results : impl Iterator < Item = Result < T , F > > , ) -> ( Vec < T > , Option < Self > ) { let mut result = vec ! [ ] ; let mut errors = ErrorGroup :: new ( None ) ; for item in results { match item { Ok ( x ) => result . push ( x ) , Err ( err ) => errors . append ( err ) , } } match errors . len ( ) { 0 => ( result , None ) , _ => ( result , Some ( errors ) ) , } }
Unwrap a list of results, splitting it into unwrapped values and an optional flattened error
THINK: Should there al
Unwrap a list of results splitting it into unwrapped values and an optional flattened error THINK : Should there al
results
impl Iterator<Item = Result<T, F>>
results
impl Iterator<Item = Result<T, F>>