Refactor imag-mail to new store iterator interface

This commit is contained in:
Matthias Beyer 2018-05-01 17:42:47 +02:00
parent 519b6f7ef2
commit 7aca84dd5e

View file

@ -43,6 +43,7 @@ extern crate libimagutil;
use std::io::Write; use std::io::Write;
use libimagerror::trace::{MapErrTrace, trace_error}; use libimagerror::trace::{MapErrTrace, trace_error};
use libimagerror::iter::TraceIterator;
use libimagerror::exit::ExitUnwrap; use libimagerror::exit::ExitUnwrap;
use libimagerror::io::ToExitCode; use libimagerror::io::ToExitCode;
use libimagmail::mail::Mail; use libimagmail::mail::Mail;
@ -143,6 +144,7 @@ fn list(rt: &Runtime) {
let _ = rt.store() let _ = rt.store()
.entries() .entries()
.map_err_trace_exit_unwrap(1) .map_err_trace_exit_unwrap(1)
.trace_unwrap_exit(1)
.filter(|id| id.is_in_collection(&["mail"])) .filter(|id| id.is_in_collection(&["mail"]))
.filter_map(|id| { .filter_map(|id| {
rt.store() rt.store()