diff options
| author | Geoffry Song <goffrie@gmail.com> | 2019-03-29 15:03:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-29 15:03:14 -0700 |
| commit | 7ce0b67272a760aff12505b5ca04357a3dc5c0ed (patch) | |
| tree | bb4b43286341df689607e0378af6401f870dbcef | |
| parent | e782d790f1b63d82af39248bebe027f92d891bcc (diff) | |
| download | rust-7ce0b67272a760aff12505b5ca04357a3dc5c0ed.tar.gz rust-7ce0b67272a760aff12505b5ca04357a3dc5c0ed.zip | |
Fix OnceWith docstring.
This was incorrectly copypasta'd from RepeatWith.
| -rw-r--r-- | src/libcore/iter/sources.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/iter/sources.rs b/src/libcore/iter/sources.rs index ffc24df3ed4..7934e5880d7 100644 --- a/src/libcore/iter/sources.rs +++ b/src/libcore/iter/sources.rs @@ -375,8 +375,8 @@ pub fn once<T>(value: T) -> Once<T> { Once { inner: Some(value).into_iter() } } -/// An iterator that repeats elements of type `A` endlessly by -/// applying the provided closure `F: FnMut() -> A`. +/// An iterator that yields a single element of type `A` by +/// applying the provided closure `F: FnOnce() -> A`. /// /// This `struct` is created by the [`once_with`] function. /// See its documentation for more. |
