summaryrefslogtreecommitdiffstats
path: root/bin/domain/imag-contact/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'bin/domain/imag-contact/src/main.rs')
-rw-r--r--bin/domain/imag-contact/src/main.rs19
1 files changed, 5 insertions, 14 deletions
diff --git a/bin/domain/imag-contact/src/main.rs b/bin/domain/imag-contact/src/main.rs
index 3385beef..a68ee6a6 100644
--- a/bin/domain/imag-contact/src/main.rs
+++ b/bin/domain/imag-contact/src/main.rs
@@ -125,8 +125,7 @@ fn list(rt: &Runtime) {
.map(|fle| fle.ok_or_else(|| Error::from(err_msg("StoreId not found".to_owned()))))
.trace_unwrap_exit(1)
.map(|fle| {
- let _ = rt.report_touched(fle.get_location())
- .map_err_trace_exit_unwrap(1);
+ let _ = rt.report_touched(fle.get_location()).unwrap_or_exit();
fle
})
.map(|e| e.deser())
@@ -171,9 +170,7 @@ fn import(rt: &Runtime) {
.retrieve_from_path(&path)
.map_err_trace_exit_unwrap(1);
- let _ = rt
- .report_touched(entry.get_location())
- .map_err_trace_exit_unwrap(1);
+ let _ = rt.report_touched(entry.get_location()).unwrap_or_exit();
} else if path.is_dir() {
for entry in WalkDir::new(path).min_depth(1).into_iter() {
let entry = entry
@@ -187,9 +184,7 @@ fn import(rt: &Runtime) {
.retrieve_from_path(&pb)
.map_err_trace_exit_unwrap(1);
- let _ = rt
- .report_touched(fle.get_location())
- .map_err_trace_exit_unwrap(1);
+ let _ = rt.report_touched(fle.get_location()).unwrap_or_exit();
info!("Imported: {}", entry.path().to_str().unwrap_or("<non UTF-8 path>"));
} else {
warn!("Ignoring non-file: {}", entry.path().to_str().unwrap_or("<non UTF-8 path>"));
@@ -228,9 +223,7 @@ fn show(rt: &Runtime) {
.unwrap() // exited above
.starts_with(&hash)
{
- let _ = rt
- .report_touched(entry.get_location())
- .map_err_trace_exit_unwrap(1);
+ let _ = rt.report_touched(entry.get_location()).unwrap_or_exit();
Some(deser)
} else {
None
@@ -285,9 +278,7 @@ fn find(rt: &Runtime) {
|| card.fullname().iter().any(|a| str_contains_any(a, &grepstring));
if take {
- let _ = rt
- .report_touched(entry.get_location())
- .map_err_trace_exit_unwrap(1);
+ let _ = rt.report_touched(entry.get_location()).unwrap_or_exit();
// optimization so we don't have to parse again in the next step
Some((entry, card))