Skip to content

Commit bef9361

Browse files
committed
Update iterators.md
Fix the actual off by one
1 parent 4425422 commit bef9361

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/trpl/iterators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ As we've said before, an iterator is something that we can call the
213213
`.next()` method on repeatedly, and it gives us a sequence of things.
214214
Because you need to call the method, this means that iterators
215215
can be *lazy* and not generate all of the values upfront. This code,
216-
for example, does not actually generate the numbers `1-100`, instead
216+
for example, does not actually generate the numbers `1-99`, instead
217217
creating a value that merely represents the sequence:
218218

219219
```rust
@@ -259,7 +259,7 @@ a new iterator. The simplest one is called `map`:
259259

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

265265
```text

0 commit comments

Comments
 (0)