From 4aa3243ed096f2cc5c47910ef0bb034f4e7880fb Mon Sep 17 00:00:00 2001 From: Dodothereal <129273127+Dodothereal@users.noreply.github.com> Date: Tue, 23 Jun 2026 13:09:37 +0200 Subject: [PATCH] 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. --- src/ch13-02-iterators.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch13-02-iterators.md b/src/ch13-02-iterators.md index 99f262594..cc51553dd 100644 --- a/src/ch13-02-iterators.md +++ b/src/ch13-02-iterators.md @@ -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`