From f63c168563743ddc402335893a9cacfcb780ccc9 Mon Sep 17 00:00:00 2001 From: Jacob Wahlgren Date: Sun, 6 Nov 2016 01:17:41 +0100 Subject: [PATCH] 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. --- ignore/src/dir.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ignore/src/dir.rs b/ignore/src/dir.rs index ebc2c699..370fd92d 100644 --- a/ignore/src/dir.rs +++ b/ignore/src/dir.rs @@ -75,7 +75,7 @@ struct IgnoreOptions { impl IgnoreOptions { /// 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 } } @@ -280,7 +280,7 @@ impl Ignore { } } 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); if mat.is_ignore() { return mat;