Rollup merge of #25941 - puzza007:trpl-infinite-iterator-chain-take, r=steveklabnik
This commit is contained in:
commit
98612dad9b
1 changed files with 1 additions and 1 deletions
|
|
@ -321,7 +321,7 @@ You can chain all three things together: start with an iterator, adapt it
|
|||
a few times, and then consume the result. Check it out:
|
||||
|
||||
```rust
|
||||
(1..1000)
|
||||
(1..)
|
||||
.filter(|&x| x % 2 == 0)
|
||||
.filter(|&x| x % 3 == 0)
|
||||
.take(5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue