Skip to content

Commit

Permalink
Rollup merge of #59537 - goffrie:patch-3, r=Centril
Browse files Browse the repository at this point in the history
Fix OnceWith docstring.

This was incorrectly copypasta'd from RepeatWith.
  • Loading branch information
Centril authored Mar 30, 2019
2 parents ca14c56 + 7ce0b67 commit 62a78c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libcore/iter/sources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 62a78c4

Please sign in to comment.