mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-06-30 22:23:44 +02:00
ignore/walk: correct build_parallel() documentation
The returned closure should return `WalkState`, not `()`. Closes #2767
This commit is contained in:
@ -591,7 +591,7 @@ impl WalkBuilder {
|
|||||||
///
|
///
|
||||||
/// Note that this *doesn't* return something that implements `Iterator`.
|
/// Note that this *doesn't* return something that implements `Iterator`.
|
||||||
/// Instead, the returned value must be run with a closure. e.g.,
|
/// 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 {
|
pub fn build_parallel(&self) -> WalkParallel {
|
||||||
WalkParallel {
|
WalkParallel {
|
||||||
paths: self.paths.clone().into_iter(),
|
paths: self.paths.clone().into_iter(),
|
||||||
|
Reference in New Issue
Block a user