Rollup merge of #25941 - puzza007:trpl-infinite-iterator-chain-take, r=steveklabnik
This commit is contained in:
commit
98612dad9b
|
@ -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…
Reference in New Issue