Skip to content

Commit 15aa3bb

Browse files
committed
Rollup merge of rust-lang#26255 - steveklabnik:gh25499, r=alexcrichton
Fixes rust-lang#25499
2 parents a9f1e29 + 4500019 commit 15aa3bb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/doc/trpl/iterators.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,7 @@ has no side effect on the original iterator. Let's try it out with our infinite
285285
iterator from before:
286286

287287
```rust
288-
# #![feature(step_by)]
289-
for i in (1..).step_by(5).take(5) {
288+
for i in (1..).take(5) {
290289
println!("{}", i);
291290
}
292291
```
@@ -295,10 +294,10 @@ This will print
295294

296295
```text
297296
1
298-
6
299-
11
300-
16
301-
21
297+
2
298+
3
299+
4
300+
5
302301
```
303302

304303
`filter()` is an adapter that takes a closure as an argument. This closure

0 commit comments

Comments
 (0)