File tree 2 files changed +3
-0
lines changed
library/core/src/iter/sources
2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ use crate::fmt;
3
3
/// Creates a new iterator where each iteration calls the provided closure
4
4
/// `F: FnMut() -> Option<T>`.
5
5
///
6
+ /// The iterator will yield the `T`s returned from the closure.
7
+ ///
6
8
/// This allows creating a custom iterator with any behavior
7
9
/// without using the more verbose syntax of creating a dedicated type
8
10
/// and implementing the [`Iterator`] trait for it.
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use crate::iter::FusedIterator;
5
5
///
6
6
/// The iterator starts with the given first item (if any)
7
7
/// and calls the given `FnMut(&T) -> Option<T>` closure to compute each item’s successor.
8
+ /// The iterator will yield the `T`s returned from the closure.
8
9
///
9
10
/// ```
10
11
/// use std::iter::successors;
You can’t perform that action at this time.
0 commit comments