Skip to content

Commit 5fefae6

Browse files
committed
trpl: Use infinite iterator in chain example with take
1 parent baf508b commit 5fefae6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/doc/trpl/iterators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ You can chain all three things together: start with an iterator, adapt it
321321
a few times, and then consume the result. Check it out:
322322

323323
```rust
324-
(1..1000)
324+
(1..)
325325
.filter(|&x| x % 2 == 0)
326326
.filter(|&x| x % 3 == 0)
327327
.take(5)

0 commit comments

Comments
 (0)