mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-08-04 18:18:17 +00:00
ignore/walk: correct build_parallel() documentation
The returned closure should return `WalkState`, not `()`. Closes #2767
This commit is contained in:
parent
eca13f08a2
commit
3ad0e83471
1 changed files with 1 additions and 1 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue