Skip to content

Commit

Permalink
Fix typo/inaccuracy in the documentation of Iterator::skip_while
Browse files Browse the repository at this point in the history
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_.
  • Loading branch information
steffahn committed Mar 18, 2021
1 parent 7a7bbdb commit 99b2054
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 99b2054

Please sign in to comment.