Skip to content

Commit

Permalink
Rollup merge of rust-lang#135886 - hkBst:patch-14, r=joboet
Browse files Browse the repository at this point in the history
Document purpose of closure in from_fn.rs more clearly

partial fix for rust-lang#135087 together with rust-lang#135895
  • Loading branch information
joboet authored Jan 24, 2025
2 parents e293bac + 7328de0 commit 6e38f43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/iter/sources/from_fn.rs
Original file line number Diff line number Diff line change
@@ -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.
///
Expand Down

0 comments on commit 6e38f43

Please sign in to comment.