diff options
author | cgzones <cgzones@googlemail.com> | 2024-03-27 19:50:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-27 14:50:05 -0400 |
commit | 3ad0e83471588d8802d5747d0cc9accec76f7ccf (patch) | |
tree | 277d9b1c384111903e65d6824395dda14cadfa55 | |
parent | eca13f08a2a0ece89a423565891e48a90a8aedef (diff) |
ignore/walk: correct build_parallel() documentation
The returned closure should return `WalkState`, not `()`.
Closes #2767
-rw-r--r-- | crates/ignore/src/walk.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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(), |