mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
auto merge of #17511 : MatejLach/rust/iter_guide_typo, r=alexcrichton
The sentence "The new iterator `filter()` produces returns only the elements that that closure returned `true` for:" can be structured as: "The new iterator `filter()` produces only the elements that that closure returned `true` for:" or as: "The new iterator `filter()` returns only the elements that that closure returned `true` for:" however, not both. I went with "produces", since it then talks about returning true and having "return" so close together doesn't sound nice. r @steveklabnik ?
This commit is contained in:
commit
34dfa45718
@ -4489,8 +4489,8 @@ This will print
|
||||
```
|
||||
|
||||
`filter()` is an adapter that takes a closure as an argument. This closure
|
||||
returns `true` or `false`. The new iterator `filter()` produces returns
|
||||
only the elements that that closure returned `true` for:
|
||||
returns `true` or `false`. The new iterator `filter()` produces
|
||||
only the elements that that closure returns `true` for:
|
||||
|
||||
```{rust}
|
||||
for i in range(1i, 100i).filter(|x| x % 2 == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user