mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-31 20:21:59 -07:00
Rename IgnoreOptions::has_ignores
The name has_ignores is not descriptive in my opinion. I think has_any_ignore_options more clearly states this method's purpose. I also considered simply IgnoreOptions::any though I went with the more verbose option.
This commit is contained in:
@@ -75,7 +75,7 @@ struct IgnoreOptions {
|
|||||||
|
|
||||||
impl IgnoreOptions {
|
impl IgnoreOptions {
|
||||||
/// Returns true if at least one type of ignore rules should be matched.
|
/// Returns true if at least one type of ignore rules should be matched.
|
||||||
fn should_ignores(&self) -> bool {
|
fn has_any_ignore_options(&self) -> bool {
|
||||||
self.ignore || self.git_global || self.git_ignore || self.git_exclude
|
self.ignore || self.git_global || self.git_ignore || self.git_exclude
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -280,7 +280,7 @@ impl Ignore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let mut whitelisted = Match::None;
|
let mut whitelisted = Match::None;
|
||||||
if self.0.opts.should_ignores() {
|
if self.0.opts.has_any_ignore_options() {
|
||||||
let mat = self.matched_ignore(path, is_dir);
|
let mat = self.matched_ignore(path, is_dir);
|
||||||
if mat.is_ignore() {
|
if mat.is_ignore() {
|
||||||
return mat;
|
return mat;
|
||||||
|
Reference in New Issue
Block a user