File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
library/core/src/iter/sources Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change 11use crate :: fmt;
22
33/// Creates a new iterator where each iteration calls the provided closure
4- /// `F: FnMut() -> Option<T>`.
4+ /// `F: FnMut() -> Option<T>`. The iterator will yield the `T`'s returned from the closure until it returns `None`.
55///
66/// This allows creating a custom iterator with any behavior
77/// without using the more verbose syntax of creating a dedicated type
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ use crate::iter::FusedIterator;
55///
66/// The iterator starts with the given first item (if any)
77/// 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 until it returns `None`.
89///
910/// ```
1011/// use std::iter::successors;
You can’t perform that action at this time.
0 commit comments