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:
Dodothereal
2026-06-23 13:09:37 +02:00
committed by Carol (Nichols || Goulding)
parent 5181243477
commit 4aa3243ed0

View File

@@ -196,7 +196,7 @@ their environment.
For this example, well 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 wont be included.
In Listing 13-16, we use `filter` with a closure that captures the `shoe_size`