about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarijn Schouten <hkBst@users.noreply.github.com>2025-01-22 17:24:34 +0100
committerMarijn Schouten <mhkbst@gmail.com>2025-01-26 13:43:55 +0100
commitd3cd832ddadd4146f49c1e3e919d0eb4c6a3c732 (patch)
tree7565de0edef85ee8b645f4488ad3040920c5dc27
parentb2728d5426bab1d8c39709768c7e22b7f66dde5d (diff)
Document purpose of closure in from_fn.rs more clearly
-rw-r--r--library/core/src/iter/sources/from_fn.rs4
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.
 ///