Skip to content

Commit

Permalink
Rollup merge of #83270 - steffahn:missing_word_in_skip_while_doc, r=j…
Browse files Browse the repository at this point in the history
…oshtriplett

Fix typo/inaccuracy in the documentation of Iterator::skip_while

One of the examples used to say “this leads to a possibly confusing situation, where the type of the closure is a double reference” while _actually_ referring to the type of the closure _argument_.

This PR just changes a single word in documentation.

```@rustbot``` modify labels: A-iterators, T-doc, T-lang
  • Loading branch information
JohnTitor authored Mar 19, 2021
2 parents e22f9fd + 99b2054 commit 6f38617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/iter/traits/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ pub trait Iterator {
///
/// Because the closure passed to `skip_while()` takes a reference, and many
/// iterators iterate over references, this leads to a possibly confusing
/// situation, where the type of the closure is a double reference:
/// situation, where the type of the closure argument is a double reference:
///
/// ```
/// let a = [-1, 0, 1];
Expand Down

0 comments on commit 6f38617

Please sign in to comment.