From 7ce0b67272a760aff12505b5ca04357a3dc5c0ed Mon Sep 17 00:00:00 2001 From: Geoffry Song Date: Fri, 29 Mar 2019 15:03:14 -0700 Subject: [PATCH] Fix OnceWith docstring. This was incorrectly copypasta'd from RepeatWith. --- src/libcore/iter/sources.rs | 4 ++-- 1 file 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(value: T) -> Once { 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. -- 2.44.0