summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-04-30 19:24:05 +0200
committerMatthias Beyer <mail@beyermatthias.de>2018-05-01 17:44:01 +0200
commit40a04376ed7fb747019acb62fec83dfb46b8c541 (patch)
tree4f7d801f81849b062c73ae4b588856af4db6ac91 /bin
parentd08c27e623b76f0ab87561da97ccb4678f48c953 (diff)
Refactor imag-link to fit new store iterator interface
Diffstat (limited to 'bin')
-rw-r--r--bin/core/imag-link/src/main.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/bin/core/imag-link/src/main.rs b/bin/core/imag-link/src/main.rs
index 4dd8e0de..46ce39e9 100644
--- a/bin/core/imag-link/src/main.rs
+++ b/bin/core/imag-link/src/main.rs
@@ -54,7 +54,6 @@ extern crate libimagutil;
use std::io::Write;
use std::path::PathBuf;
-use std::process::exit;
use libimagentrylink::external::ExternalLinker;
use libimagentrylink::internal::InternalLinker;
@@ -255,12 +254,11 @@ fn unlink(rt: &Runtime) {
.map(PathBuf::from)
.collect::<Vec<PathBuf>>().into_iter() // for lifetime inference
.map(StoreId::new_baseless)
- .unwrap_with(|e| { trace_error(&e); exit(1) })
.into_get_iter(rt.store())
- .unwrap_with(|e| { trace_error(&e); exit(1) })
- .filter_map(|e| e)
+ .trace_unwrap_exit(1)
+ .filter_map(|x| x)
.map(|mut entry| entry.unlink(rt.store()))
- .unwrap_with(|e| { trace_error(&e); exit(1) })
+ .trace_unwrap_exit(1)
.collect::<Vec<_>>();
}