mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2024-12-02 02:56:32 +02: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
@ -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…
Reference in New Issue
Block a user