Skip to content

Commit

Permalink
auto merge of rust-lang#17511 : MatejLach/rust/iter_guide_typo, r=ale…
Browse files Browse the repository at this point in the history
…xcrichton

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 ?
  • Loading branch information
bors committed Sep 27, 2014
2 parents e04e081 + 9ca399f commit 34dfa45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/doc/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 34dfa45

Please sign in to comment.