From 3ad0e83471588d8802d5747d0cc9accec76f7ccf Mon Sep 17 00:00:00 2001 From: cgzones Date: Wed, 27 Mar 2024 19:50:05 +0100 Subject: ignore/walk: correct build_parallel() documentation The returned closure should return `WalkState`, not `()`. Closes #2767 --- crates/ignore/src/walk.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ignore/src/walk.rs b/crates/ignore/src/walk.rs index a8d17180..d6ea9c21 100644 --- a/crates/ignore/src/walk.rs +++ b/crates/ignore/src/walk.rs @@ -591,7 +591,7 @@ impl WalkBuilder { /// /// Note that this *doesn't* return something that implements `Iterator`. /// Instead, the returned value must be run with a closure. e.g., - /// `builder.build_parallel().run(|| |path| println!("{:?}", path))`. + /// `builder.build_parallel().run(|| |path| { println!("{path:?}"); WalkState::Continue })`. pub fn build_parallel(&self) -> WalkParallel { WalkParallel { paths: self.paths.clone().into_iter(), -- cgit v1.2.3