File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ use crate::fmt;
33/// Creates a new iterator where each iteration calls the provided closure
44/// `F: FnMut() -> Option<T>`.
55///
6+ /// The iterator will yield the `T`s returned from the closure.
7+ ///
68/// This allows creating a custom iterator with any behavior
79/// without using the more verbose syntax of creating a dedicated type
810/// 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;
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.
89///
910/// ```
1011/// use std::iter::successors;
You can’t perform that action at this time.
0 commit comments