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:
Jacob Wahlgren
2016-11-06 01:17:41 +01:00
parent a05671c8d7
commit f63c168563

View File

@@ -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;