diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-11-10 10:59:34 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-12-22 02:03:35 +0100 |
commit | 383fd2ff19416808bfd1edcadb3b85a1663db8ee (patch) | |
tree | 2631acf8214cb685ce45c807001990005cb8eadf | |
parent | 8776ddc9c6cc238d6caa4b3a79c288b0ff4870c0 (diff) |
Simplify condition with iterator functions
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r-- | bin/domain/imag-todo/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/domain/imag-todo/src/lib.rs b/bin/domain/imag-todo/src/lib.rs index 3e764287..d7c95ce7 100644 --- a/bin/domain/imag-todo/src/lib.rs +++ b/bin/domain/imag-todo/src/lib.rs @@ -180,7 +180,7 @@ impl StatusMatcher { } pub fn matches(&self, todo: Status) -> bool { - if self.is_not.iter().find(|t| **t == todo).is_some() { + if self.is_not.iter().any(|t| *t == todo) { // On blacklist false } else if self.is.is_empty() || self.is.iter().any(|t| *t == todo) { |