Skip to content

Commit 0855b7c

Browse files
committed
Rollup merge of rust-lang#24994 - steveklabnik:gh24977, r=alexcrichton
Fixes rust-lang#24977
2 parents d3b7c52 + 0b06fd7 commit 0855b7c

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

src/doc/trpl/iterators.md

+2-13
Original file line numberDiff line numberDiff line change
@@ -235,26 +235,15 @@ Ranges are one of two basic iterators that you'll see. The other is `iter()`.
235235
in turn:
236236

237237
```rust
238-
let nums = [1, 2, 3];
238+
let nums = vec![1, 2, 3];
239239

240240
for num in nums.iter() {
241241
println!("{}", num);
242242
}
243243
```
244244

245245
These two basic iterators should serve you well. There are some more
246-
advanced iterators, including ones that are infinite. Like using range syntax
247-
and `step_by`:
248-
249-
```rust
250-
# #![feature(step_by)]
251-
(1..).step_by(5);
252-
```
253-
254-
This iterator counts up from one, adding five each time. It will give
255-
you a new integer every time, forever (well, technically, until it reaches the
256-
maximum number representable by an `i32`). But since iterators are lazy,
257-
that's okay! You probably don't want to use `collect()` on it, though...
246+
advanced iterators, including ones that are infinite.
258247

259248
That's enough about iterators. Iterator adapters are the last concept
260249
we need to talk about with regards to iterators. Let's get to it!

0 commit comments

Comments
 (0)