diff --git a/src/doc/guide.md b/src/doc/guide.md index 7a12ee98f44baa61637309baedf4516c8b4e0e1d..81470a93e4c25d88e57ec4081b7ef2cb9fac0b33 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -4326,7 +4326,7 @@ The most common consumer is `collect()`. This code doesn't quite compile, but it shows the intention: ```{rust,ignore} -let one_to_one_hundred = range(0i, 100i).collect(); +let one_to_one_hundred = range(1i, 101i).collect(); ``` As you can see, we call `collect()` on our iterator. `collect()` takes @@ -4336,7 +4336,7 @@ type of things you want to collect, and so you need to let it know. Here's the version that does compile: ```{rust} -let one_to_one_hundred = range(0i, 100i).collect::>(); +let one_to_one_hundred = range(1i, 101i).collect::>(); ``` If you remember, the `::<>` syntax allows us to give a type hint,