Skip to content

Commit

Permalink
ignore/walk: correct build_parallel() documentation
Browse files Browse the repository at this point in the history
The returned closure should return `WalkState`, not `()`.

Closes #2767
  • Loading branch information
cgzones committed Mar 27, 2024
1 parent eca13f0 commit 3ad0e83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/ignore/src/walk.rs
Expand Up @@ -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(),
Expand Down

0 comments on commit 3ad0e83

Please sign in to comment.