[No-auto] bin/core/grep: Fix Clippy warnings

Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
flip1995 2019-08-27 10:32:09 +02:00 committed by Matthias Beyer
parent 0befd68c95
commit 4579187549

View file

@ -90,8 +90,12 @@ fn main() {
.map_err_trace_exit_unwrap() .map_err_trace_exit_unwrap()
.into_get_iter() .into_get_iter()
.filter_map(|res| res.map_err_trace_exit_unwrap()) .filter_map(|res| res.map_err_trace_exit_unwrap())
.filter(|entry| pattern.is_match(entry.get_content())) .filter_map(|entry| if pattern.is_match(entry.get_content()) {
.map(|entry| show(&rt, &entry, &pattern, &opts, &mut count)) show(&rt, &entry, &pattern, &opts, &mut count);
Some(())
} else {
None
})
.count(); .count();
if opts.count { if opts.count {