Skip to content

Commit

Permalink
Deprecate fold1 in faviour of reduce
Browse files Browse the repository at this point in the history
  • Loading branch information
WaffleLapkin committed Oct 12, 2021
1 parent b6c99ba commit 42033ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Expand Up @@ -2243,6 +2243,7 @@ pub trait Itertools : Iterator {
/// assert_eq!((0..10).fold1(|x, y| x + y).unwrap_or(0), 45);
/// assert_eq!((0..0).fold1(|x, y| x * y), None);
/// ```
#[deprecated(since = "0.10.2", note = "Use `Iterator::reduce` instead")]
fn fold1<F>(mut self, f: F) -> Option<Self::Item>
where F: FnMut(Self::Item, Self::Item) -> Self::Item,
Self: Sized,
Expand Down

0 comments on commit 42033ad

Please sign in to comment.