Fix imag-mail to use new Ref interface
This commit is contained in:
parent
6d40797a07
commit
7ff3985eaf
1 changed files with 6 additions and 5 deletions
|
@ -33,6 +33,7 @@ extern crate libimagentryref;
|
||||||
use libimagerror::trace::{MapErrTrace, trace_error, trace_error_exit};
|
use libimagerror::trace::{MapErrTrace, trace_error, trace_error_exit};
|
||||||
use libimagmail::mail::Mail;
|
use libimagmail::mail::Mail;
|
||||||
use libimagentryref::reference::Ref;
|
use libimagentryref::reference::Ref;
|
||||||
|
use libimagentryref::refstore::RefStore;
|
||||||
use libimagrt::runtime::Runtime;
|
use libimagrt::runtime::Runtime;
|
||||||
use libimagrt::setup::generate_runtime_setup;
|
use libimagrt::setup::generate_runtime_setup;
|
||||||
use libimagutil::debug_result::*;
|
use libimagutil::debug_result::*;
|
||||||
|
@ -83,11 +84,11 @@ fn list(rt: &Runtime) {
|
||||||
|
|
||||||
let iter = match store.retrieve_for_module("ref") {
|
let iter = match store.retrieve_for_module("ref") {
|
||||||
Ok(iter) => iter.filter_map(|id| {
|
Ok(iter) => iter.filter_map(|id| {
|
||||||
Ref::get(store, id)
|
match store.get(id).map_err_into(MEK::RefHandlingError).map_err_trace() {
|
||||||
.map_err_into(MEK::RefHandlingError)
|
Ok(Some(fle)) => Mail::from_fle(fle).map_err_trace().ok(),
|
||||||
.and_then(|rf| Mail::from_ref(rf))
|
Ok(None) => None,
|
||||||
.map_err_trace()
|
Err(e) => trace_error_exit(&e, 1),
|
||||||
.ok()
|
}
|
||||||
}),
|
}),
|
||||||
Err(e) => trace_error_exit(&e, 1),
|
Err(e) => trace_error_exit(&e, 1),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue