From 2b845c773b4524769a86a418c26c658fea3e5162 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 3 Sep 2017 20:46:32 +0200 Subject: [PATCH] imag-mail: Rewrite error handling --- bin/domain/imag-mail/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/domain/imag-mail/src/main.rs b/bin/domain/imag-mail/src/main.rs index 5fd6d1d4..02c107c5 100644 --- a/bin/domain/imag-mail/src/main.rs +++ b/bin/domain/imag-mail/src/main.rs @@ -68,14 +68,14 @@ fn import_mail(rt: &Runtime) { fn list(rt: &Runtime) { use libimagmail::error::MailErrorKind as MEK; - use libimagmail::error::MapErrInto; + use libimagmail::error::ResultExt; let store = rt.store(); let iter = match store.retrieve_for_module("ref") { Ok(iter) => iter.filter_map(|id| { Ref::get(store, id) - .map_err_into(MEK::RefHandlingError) + .chain_err(|| MEK::RefHandlingError) .and_then(|rf| Mail::from_ref(rf)) .map_err_trace() .ok()