summaryrefslogtreecommitdiffstats
path: root/bin/core/imag-grep/src
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2019-08-27 10:40:13 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-08-28 18:18:40 +0200
commite2395b0474a69c7a88dfadeb1c537fc042908bd0 (patch)
treecfe382bf10f6d8c753be2950f9abcdf72b2c3664 /bin/core/imag-grep/src
parent1635dd46651c4980d370b0e4a248c26dbce00036 (diff)
[Auto] bin/core/grep: Fix Clippy warnings
Signed-off-by: flip1995 <hello@philkrones.com> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin/core/imag-grep/src')
-rw-r--r--bin/core/imag-grep/src/main.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/core/imag-grep/src/main.rs b/bin/core/imag-grep/src/main.rs
index faf5c139..74148cef 100644
--- a/bin/core/imag-grep/src/main.rs
+++ b/bin/core/imag-grep/src/main.rs
@@ -95,9 +95,9 @@ fn main() {
.count();
if opts.count {
- let _ = writeln!(rt.stdout(), "{}", count).to_exit_code().unwrap_or_exit();
+ writeln!(rt.stdout(), "{}", count).to_exit_code().unwrap_or_exit();
} else if !opts.files_with_matches {
- let _ = writeln!(rt.stdout(), "Processed {} files, {} matches, {} nonmatches",
+ writeln!(rt.stdout(), "Processed {} files, {} matches, {} nonmatches",
overall_count,
count,
overall_count - count)
@@ -108,23 +108,23 @@ fn main() {
fn show(rt: &Runtime, e: &Entry, re: &Regex, opts: &Options, count: &mut usize) {
if opts.files_with_matches {
- let _ = writeln!(rt.stdout(), "{}", e.get_location()).to_exit_code().unwrap_or_exit();
+ writeln!(rt.stdout(), "{}", e.get_location()).to_exit_code().unwrap_or_exit();
} else if opts.count {
*count += 1;
} else {
- let _ = writeln!(rt.stdout(), "{}:", e.get_location()).to_exit_code().unwrap_or_exit();
+ writeln!(rt.stdout(), "{}:", e.get_location()).to_exit_code().unwrap_or_exit();
for capture in re.captures_iter(e.get_content()) {
for mtch in capture.iter() {
if let Some(m) = mtch {
- let _ = writeln!(rt.stdout(), " '{}'", m.as_str()).to_exit_code().unwrap_or_exit();
+ writeln!(rt.stdout(), " '{}'", m.as_str()).to_exit_code().unwrap_or_exit();
}
}
}
- let _ = writeln!(rt.stdout(), "").to_exit_code().unwrap_or_exit();
+ writeln!(rt.stdout()).to_exit_code().unwrap_or_exit();
*count += 1;
}
- let _ = rt.report_touched(e.get_location()).unwrap_or_exit();
+ rt.report_touched(e.get_location()).unwrap_or_exit();
}