Skip to content

Commit 62a78c4

Browse files
authored
Rollup merge of #59537 - goffrie:patch-3, r=Centril
Fix OnceWith docstring. This was incorrectly copypasta'd from RepeatWith.
2 parents ca14c56 + 7ce0b67 commit 62a78c4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libcore/iter/sources.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,8 @@ pub fn once<T>(value: T) -> Once<T> {
375375
Once { inner: Some(value).into_iter() }
376376
}
377377

378-
/// An iterator that repeats elements of type `A` endlessly by
379-
/// applying the provided closure `F: FnMut() -> A`.
378+
/// An iterator that yields a single element of type `A` by
379+
/// applying the provided closure `F: FnOnce() -> A`.
380380
///
381381
/// This `struct` is created by the [`once_with`] function.
382382
/// See its documentation for more.

0 commit comments

Comments
 (0)