From bef936111dd3c65b668d85f8201586e73b325bfa Mon Sep 17 00:00:00 2001 From: Steve Gury Date: Sun, 31 May 2015 10:24:30 -0700 Subject: [PATCH] Update iterators.md Fix the actual off by one --- src/doc/trpl/iterators.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/trpl/iterators.md b/src/doc/trpl/iterators.md index 9ba4c0d9831..c391a0ea9b6 100644 --- a/src/doc/trpl/iterators.md +++ b/src/doc/trpl/iterators.md @@ -213,7 +213,7 @@ As we've said before, an iterator is something that we can call the `.next()` method on repeatedly, and it gives us a sequence of things. Because you need to call the method, this means that iterators can be *lazy* and not generate all of the values upfront. This code, -for example, does not actually generate the numbers `1-100`, instead +for example, does not actually generate the numbers `1-99`, instead creating a value that merely represents the sequence: ```rust @@ -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-101`. Well, almost! If you +So this would give us the numbers from `2-100`. Well, almost! If you compile the example, you'll get a warning: ```text