Skip to content

Commit

Permalink
Rollup merge of #86111 - spookyvision:master, r=JohnTitor
Browse files Browse the repository at this point in the history
fix off by one in `std::iter::Iterator` documentation

the range `(0..10)` is documented as "The even numbers from zero to ten." - should be ".. to nine".
  • Loading branch information
JohnTitor authored Jun 10, 2021
2 parents ceed619 + acc65cc commit 6a292eb
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 @@ -138,7 +138,7 @@ pub trait Iterator {
/// A more complex example:
///
/// ```
/// // The even numbers from zero to ten.
/// // The even numbers in the range of zero to nine.
/// let iter = (0..10).filter(|x| x % 2 == 0);
///
/// // We might iterate from zero to ten times. Knowing that it's five
Expand Down

0 comments on commit 6a292eb

Please sign in to comment.