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 `()`.
  • Loading branch information
cgzones authored Mar 27, 2024
1 parent eca13f0 commit f2ba7a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/ignore/src/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit f2ba7a0

Please sign in to comment.