From f2ba7a0828a2fb04faf2c03ffe8f2ddc553b681e Mon Sep 17 00:00:00 2001 From: cgzones Date: Wed, 27 Mar 2024 19:23:30 +0100 Subject: [PATCH] ignore/walk: correct build_parallel() documentation The returned closure should return `WalkState`, not `()`. --- crates/ignore/src/walk.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ignore/src/walk.rs b/crates/ignore/src/walk.rs index a8d171809..aedc71134 100644 --- a/crates/ignore/src/walk.rs +++ b/crates/ignore/src/walk.rs @@ -591,7 +591,8 @@ 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(),