diff options
| author | Marijn Schouten <hkBst@users.noreply.github.com> | 2025-01-22 17:24:34 +0100 |
|---|---|---|
| committer | Marijn Schouten <mhkbst@gmail.com> | 2025-01-26 13:43:55 +0100 |
| commit | d3cd832ddadd4146f49c1e3e919d0eb4c6a3c732 (patch) | |
| tree | 7565de0edef85ee8b645f4488ad3040920c5dc27 | |
| parent | b2728d5426bab1d8c39709768c7e22b7f66dde5d (diff) | |
Document purpose of closure in from_fn.rs more clearly
| -rw-r--r-- | library/core/src/iter/sources/from_fn.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/iter/sources/from_fn.rs b/library/core/src/iter/sources/from_fn.rs index 5f3d404d7dc..75cc0ffe3c7 100644 --- a/library/core/src/iter/sources/from_fn.rs +++ b/library/core/src/iter/sources/from_fn.rs @@ -1,7 +1,7 @@ use crate::fmt; -/// Creates a new iterator where each iteration calls the provided closure -/// `F: FnMut() -> Option<T>`. +/// Creates an iterator with the provided closure +/// `F: FnMut() -> Option<T>` as its `[next](Iterator::next)` method. /// /// The iterator will yield the `T`s returned from the closure. /// |
