mirror of
https://github.com/rust-lang/book.git
synced 2026-07-22 01:57:10 -04:00
docs(ch13-02): fix typo 'iteration' to 'iterator' in filter example
Fixes #4705 The line "the value will be included in the iteration produced by filter" should refer to "the iterator produced by filter", matching the surrounding paragraph's use of "iterator" and matching what filter actually returns (an iterator that lazily yields the chosen items). Verified against the current rendering on the stable book page: https://doc.rust-lang.org/stable/book/ch13-02-iterators.html#closures-that-capture-their-environment Only one word is changed. `dprint fmt` reports no further formatting changes.
This commit is contained in:
committed by
Carol (Nichols || Goulding)
parent
5181243477
commit
4aa3243ed0
@@ -196,7 +196,7 @@ their environment.
|
||||
|
||||
For this example, we’ll use the `filter` method that takes a closure. The
|
||||
closure gets an item from the iterator and returns a `bool`. If the closure
|
||||
returns `true`, the value will be included in the iteration produced by
|
||||
returns `true`, the value will be included in the iterator produced by
|
||||
`filter`. If the closure returns `false`, the value won’t be included.
|
||||
|
||||
In Listing 13-16, we use `filter` with a closure that captures the `shoe_size`
|
||||
|
||||
Reference in New Issue
Block a user