Skip to content

Commit 42033ad

Browse files
committed
Deprecate fold1 in faviour of reduce
1 parent b6c99ba commit 42033ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2243,6 +2243,7 @@ pub trait Itertools : Iterator {
22432243
/// assert_eq!((0..10).fold1(|x, y| x + y).unwrap_or(0), 45);
22442244
/// assert_eq!((0..0).fold1(|x, y| x * y), None);
22452245
/// ```
2246+
#[deprecated(since = "0.10.2", note = "Use `Iterator::reduce` instead")]
22462247
fn fold1<F>(mut self, f: F) -> Option<Self::Item>
22472248
where F: FnMut(Self::Item, Self::Item) -> Self::Item,
22482249
Self: Sized,

0 commit comments

Comments
 (0)