Skip to content

Commit 34dfa45

Browse files
committed
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 ?
2 parents e04e081 + 9ca399f commit 34dfa45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/doc/guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4489,8 +4489,8 @@ This will print
44894489
```
44904490

44914491
`filter()` is an adapter that takes a closure as an argument. This closure
4492-
returns `true` or `false`. The new iterator `filter()` produces returns
4493-
only the elements that that closure returned `true` for:
4492+
returns `true` or `false`. The new iterator `filter()` produces
4493+
only the elements that that closure returns `true` for:
44944494

44954495
```{rust}
44964496
for i in range(1i, 100i).filter(|x| x % 2 == 0) {

0 commit comments

Comments
 (0)