Fix off by one in the iterator documentation

`(1..100).map(|x| x + 1)` is actually mapping [1,100) to [2,101)
This commit is contained in:
Steve Gury 2015-05-31 07:32:21 -07:00
parent 243e85f393
commit 4425422bdd

View File

@ -259,7 +259,7 @@ a new iterator. The simplest one is called `map`:
`map` is called upon another iterator, and produces a new iterator where each
element reference has the closure it's been given as an argument called on it.
So this would give us the numbers from `2-100`. Well, almost! If you
So this would give us the numbers from `2-101`. Well, almost! If you
compile the example, you'll get a warning:
```text