Fix imag-log for new Diary::entries() interface
This commit is contained in:
parent
affd15a890
commit
eccb52a85c
2 changed files with 10 additions and 1 deletions
|
@ -27,6 +27,7 @@ toml = "0.4"
|
|||
toml-query = "0.6"
|
||||
is-match = "0.1"
|
||||
|
||||
libimagstore = { version = "0.7.0", path = "../../../lib/core/libimagstore" }
|
||||
libimagrt = { version = "0.7.0", path = "../../../lib/core/libimagrt" }
|
||||
libimagerror = { version = "0.7.0", path = "../../../lib/core/libimagerror" }
|
||||
libimagdiary = { version = "0.7.0", path = "../../../lib/domain/libimagdiary" }
|
||||
|
|
|
@ -40,6 +40,7 @@ extern crate toml_query;
|
|||
|
||||
extern crate libimaglog;
|
||||
#[macro_use] extern crate libimagrt;
|
||||
extern crate libimagstore;
|
||||
extern crate libimagerror;
|
||||
extern crate libimagdiary;
|
||||
|
||||
|
@ -53,6 +54,7 @@ use libimagerror::exit::ExitUnwrap;
|
|||
use libimagdiary::diary::Diary;
|
||||
use libimaglog::log::Log;
|
||||
use libimaglog::error::LogError as LE;
|
||||
use libimagstore::iter::get::StoreIdGetIteratorExtension;
|
||||
|
||||
mod ui;
|
||||
use ui::build_ui;
|
||||
|
@ -121,9 +123,15 @@ fn show(rt: &Runtime) {
|
|||
};
|
||||
|
||||
for iter in iters {
|
||||
let _ = iter.map(|element| {
|
||||
let _ = iter.into_get_iter(rt.store()).map(|element| {
|
||||
let e = element.map_err_trace_exit_unwrap(1);
|
||||
|
||||
if e.is_none() {
|
||||
warn!("Failed to retrieve an entry from an existing store id");
|
||||
return Ok(())
|
||||
}
|
||||
let e = e.unwrap(); // safe with above check
|
||||
|
||||
if !e.is_log().map_err_trace_exit_unwrap(1) {
|
||||
return Ok(());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue