Skip to content

Commit

Permalink
Merge pull request #331 from scottmcm/master
Browse files Browse the repository at this point in the history
Use assert_ne now that the minver is higher
  • Loading branch information
bluss authored Mar 6, 2019
2 parents 2a092df + 9fb91bc commit 37ff28f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1690,10 +1690,9 @@ pub trait Itertools : Iterator {
/// assert_eq!((0..10).tree_fold1(|x, y| x + y),
/// (0..10).fold1(|x, y| x + y));
/// // ...but not for non-associative ones
/// assert!((0..10).tree_fold1(|x, y| x - y)
/// != (0..10).fold1(|x, y| x - y));
/// assert_ne!((0..10).tree_fold1(|x, y| x - y),
/// (0..10).fold1(|x, y| x - y));
/// ```
// FIXME: If minver changes to >= 1.13, use `assert_ne!` in the doctest.
fn tree_fold1<F>(mut self, mut f: F) -> Option<Self::Item>
where F: FnMut(Self::Item, Self::Item) -> Self::Item,
Self: Sized,
Expand Down

0 comments on commit 37ff28f

Please sign in to comment.