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 e388b1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.5.1] - 2023-22-03

### Fixed

- Panic when `BarnesHut` tree is empty.

### Changed

- `iterators` module renamed to `iterator`.

### Fixed

- Panic when `BarnesHut` tree is empty.

## [0.5.0] - 2023-22-03

### Breaking changes
Expand Down
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 e388b1c

Please sign in to comment.