Skip to content

Commit 60926b8

Browse files
committed
Auto merge of #25927 - stevegury:patch-1, r=steveklabnik
`(1..100).map(|x| x + 1)` is actually mapping [1,100) to [2,101)
2 parents 243e85f + bef9361 commit 60926b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/iterators.md

+1-1
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

0 commit comments

Comments
 (0)