Rollup merge of #59537 - goffrie:patch-3, r=Centril
Fix OnceWith docstring. This was incorrectly copypasta'd from RepeatWith.
This commit is contained in:
commit
62a78c4fcf
@ -375,8 +375,8 @@ pub fn once<T>(value: T) -> Once<T> {
|
|||||||
Once { inner: Some(value).into_iter() }
|
Once { inner: Some(value).into_iter() }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An iterator that repeats elements of type `A` endlessly by
|
/// An iterator that yields a single element of type `A` by
|
||||||
/// applying the provided closure `F: FnMut() -> A`.
|
/// applying the provided closure `F: FnOnce() -> A`.
|
||||||
///
|
///
|
||||||
/// This `struct` is created by the [`once_with`] function.
|
/// This `struct` is created by the [`once_with`] function.
|
||||||
/// See its documentation for more.
|
/// See its documentation for more.
|
||||||
|
Loading…
Reference in New Issue
Block a user