1
0
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:
cgzones 2024-03-27 19:50:05 +01:00 committed by GitHub
parent eca13f08a2
commit 3ad0e83471
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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(),