1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-11-23 21:54:45 +02:00

ignore: clarify WalkBuilder::filter_entry

Fixes #2913
This commit is contained in:
Andrew Gallant
2025-09-22 21:49:29 -04:00
parent 6e77339f30
commit e42432cc5d

View File

@@ -898,6 +898,10 @@ impl WalkBuilder {
/// ///
/// Note that the errors for reading entries that may not satisfy the /// Note that the errors for reading entries that may not satisfy the
/// predicate will still be yielded. /// predicate will still be yielded.
///
/// Note also that only one filter predicate can be applied to a
/// `WalkBuilder`. Calling this subsequent times overrides previous filter
/// predicates.
pub fn filter_entry<P>(&mut self, filter: P) -> &mut WalkBuilder pub fn filter_entry<P>(&mut self, filter: P) -> &mut WalkBuilder
where where
P: Fn(&DirEntry) -> bool + Send + Sync + 'static, P: Fn(&DirEntry) -> bool + Send + Sync + 'static,