summaryrefslogtreecommitdiffstats
path: root/bin/core/imag-grep/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/core/imag-grep/src/lib.rs')
-rw-r--r--bin/core/imag-grep/src/lib.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/bin/core/imag-grep/src/lib.rs b/bin/core/imag-grep/src/lib.rs
index 53101a3f..fd9e548c 100644
--- a/bin/core/imag-grep/src/lib.rs
+++ b/bin/core/imag-grep/src/lib.rs
@@ -123,13 +123,11 @@ impl ImagApplication for ImagGrep {
if !rt.output_is_pipe() || rt.output_data_pipe() {
writeln!(rt.stdout(), "{}", count)?;
}
- } else if !opts.files_with_matches {
- if !rt.output_is_pipe() || rt.output_data_pipe() {
- writeln!(rt.stdout(), "Processed {} files, {} matches, {} nonmatches",
- overall_count,
- count,
- overall_count - count)?;
- }
+ } else if !opts.files_with_matches && (!rt.output_is_pipe() || rt.output_data_pipe()) {
+ writeln!(rt.stdout(), "Processed {} files, {} matches, {} nonmatches",
+ overall_count,
+ count,
+ overall_count - count)?;
}
Ok(())