Rollup merge of #86111 - spookyvision:master, r=JohnTitor

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".
This commit is contained in:
Yuki Okushi 2021-06-10 11:02:14 +09:00 committed by GitHub
commit 6a292ebdcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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