Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Canleskis committed May 28, 2023
1 parent 09633d3 commit aed076e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/compute_method.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::iter::{zip, Zip};

/// Trait to perform a computation of values of type `V` between objects contained in a storage of type `S`.
///
/// # Example
Expand Down Expand Up @@ -76,8 +78,7 @@ where
}
}

pub(crate) type ComputeResult<U, O> =
std::iter::Zip<std::vec::IntoIter<U>, <O as IntoIterator>::IntoIter>;
pub(crate) type ComputeResult<U, O> = Zip<std::vec::IntoIter<U>, <O as IntoIterator>::IntoIter>;

/// Trait to perform a computation from an iterator using a provided [`ComputeMethod`].
pub trait Compute: Iterator {
Expand All @@ -95,7 +96,7 @@ pub trait Compute: Iterator {
let items: Vec<_> = self.collect();
let storage = S::new(items.iter().map(f));

items.into_iter().zip(cm.compute(storage).into_iter())
zip(items, cm.compute(storage))
}
}

Expand Down

0 comments on commit aed076e

Please sign in to comment.