diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2017-10-12 19:08:36 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2017-10-12 20:15:46 +0200 |
commit | 815cde76d007457576bce7d2c64e0f5be4c244c1 (patch) | |
tree | fda72d7d11d381c40b0ac4682b6692f3b4fe232e /bin/core/imag-grep/src | |
parent | eb4681bf653fb0f1b64713c0ecc8cfbf98d5d601 (diff) |
Rewrite .map_err_trace_exit().unwrap() with new helper fn
Diffstat (limited to 'bin/core/imag-grep/src')
-rw-r--r-- | bin/core/imag-grep/src/main.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/core/imag-grep/src/main.rs b/bin/core/imag-grep/src/main.rs index 062bdb01..33cad496 100644 --- a/bin/core/imag-grep/src/main.rs +++ b/bin/core/imag-grep/src/main.rs @@ -72,16 +72,14 @@ fn main() { .value_of("pattern") .map(Regex::new) .unwrap() // ensured by clap - .map_err_trace_exit(1) - .unwrap(); // ensured by line above + .map_err_trace_exit_unwrap(1); let overall_count = rt .store() .entries() - .map_err_trace_exit(1) - .unwrap() // ensured by above line + .map_err_trace_exit_unwrap(1) .into_get_iter(rt.store()) - .filter_map(|res| res.map_err_trace_exit(1).unwrap()) + .filter_map(|res| res.map_err_trace_exit_unwrap(1)) .filter(|entry| pattern.is_match(entry.get_content())) .map(|entry| show(&entry, &pattern, &opts, &mut count)) .count(); |