Skip to content

Commit

Permalink
Rollup merge of rust-lang#83270 - steffahn:missing_word_in_skip_while…
Browse files Browse the repository at this point in the history
…_doc, r=joshtriplett

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
Dylan-DPC authored Mar 19, 2021
2 parents 146bcdc + 99b2054 commit f40e8dc
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 f40e8dc

Please sign in to comment.