summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-08-27 10:32:09 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-08-28 18:18:40 +0200
commit4579187549634ef383e09d215a7518973059a183 (patch)
treeed3e211520bdf44fa83d02e34c0284cf5de905d9
parent0befd68c952c763003dd3fe3e317a55946bc3f45 (diff)
[No-auto] bin/core/grep: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--bin/core/imag-grep/src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/core/imag-grep/src/main.rs b/bin/core/imag-grep/src/main.rs
index 74148cef..a7b1a1f3 100644
--- a/bin/core/imag-grep/src/main.rs
+++ b/bin/core/imag-grep/src/main.rs
@@ -90,8 +90,12 @@ fn main() {
.map_err_trace_exit_unwrap()
.into_get_iter()
.filter_map(|res| res.map_err_trace_exit_unwrap())
- .filter(|entry| pattern.is_match(entry.get_content()))
- .map(|entry| show(&rt, &entry, &pattern, &opts, &mut count))
+ .filter_map(|entry| if pattern.is_match(entry.get_content()) {
+ show(&rt, &entry, &pattern, &opts, &mut count);
+ Some(())
+ } else {
+ None
+ })
.count();
if opts.count {