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::>().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::>(); }