We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2a092df + 9fb91bc commit 37ff28fCopy full SHA for 37ff28f
src/lib.rs
@@ -1690,10 +1690,9 @@ pub trait Itertools : Iterator {
1690
/// assert_eq!((0..10).tree_fold1(|x, y| x + y),
1691
/// (0..10).fold1(|x, y| x + y));
1692
/// // ...but not for non-associative ones
1693
- /// assert!((0..10).tree_fold1(|x, y| x - y)
1694
- /// != (0..10).fold1(|x, y| x - y));
+ /// assert_ne!((0..10).tree_fold1(|x, y| x - y),
+ /// (0..10).fold1(|x, y| x - y));
1695
/// ```
1696
- // FIXME: If minver changes to >= 1.13, use `assert_ne!` in the doctest.
1697
fn tree_fold1<F>(mut self, mut f: F) -> Option<Self::Item>
1698
where F: FnMut(Self::Item, Self::Item) -> Self::Item,
1699
Self: Sized,
0 commit comments