summaryrefslogtreecommitdiffstats
path: root/bin/core/imag-grep/src
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-02-05 01:37:32 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-02-11 03:52:04 +0100
commit90eaeb642af712c6dc556ad8342e6d218c892cc1 (patch)
tree54764c60307db0bd7dd43c7c6fa222f98be545dd /bin/core/imag-grep/src
parent01fa19aadebbe94c6b759608e2f75f2714b74c94 (diff)
Remove magic constants in trace_unwrap_exit/map_err_trace_exit_unwrap calls
This patch removes the magic constant we used when calling `trace_unwrap_exit()` or `map_err_trace_exit_unwrap()`. We used to call it with `1` as parameter, where the number was the exit code to use. Now the implementation of the function does it automatically (using 1 (one) as exit code). All calls of these functions were fixed. Thanks to vim this was easy. 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.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/core/imag-grep/src/main.rs b/bin/core/imag-grep/src/main.rs
index 9ab3c29d..faf5c139 100644
--- a/bin/core/imag-grep/src/main.rs
+++ b/bin/core/imag-grep/src/main.rs
@@ -87,9 +87,9 @@ fn main() {
let overall_count = rt
.store()
.entries()
- .map_err_trace_exit_unwrap(1)
+ .map_err_trace_exit_unwrap()
.into_get_iter()
- .filter_map(|res| res.map_err_trace_exit_unwrap(1))
+ .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))
.count();