about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-06-10 11:02:14 +0900
committerGitHub <noreply@github.com>2021-06-10 11:02:14 +0900
commit6a292ebdcf7d0c32fd48c0306e66ae855be5e5c9 (patch)
tree7db245251c9e971b4efd2e5eb87b88f9f5753009
parentceed6191946025b45b7760cecdf69104856b1fb5 (diff)
parentacc65ccc780af7177d7a2c16695e12ce0d88dfc2 (diff)
downloadrust-6a292ebdcf7d0c32fd48c0306e66ae855be5e5c9.tar.gz
rust-6a292ebdcf7d0c32fd48c0306e66ae855be5e5c9.zip
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".
-rw-r--r--library/core/src/iter/traits/iterator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs
index 96b924f6e2a..11dea400a46 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -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