diff --git a/bin/domain/imag-todo/Cargo.toml b/bin/domain/imag-todo/Cargo.toml index 4d6ca1fb..c6e6b74b 100644 --- a/bin/domain/imag-todo/Cargo.toml +++ b/bin/domain/imag-todo/Cargo.toml @@ -24,8 +24,9 @@ maintenance = { status = "actively-developed" } [dependencies] log = "0.4.0" toml = "0.4" -toml-query = "0.7" +toml-query = { git = "https://github.com/matthiasbeyer/toml-query", branch = "failure" } is-match = "0.1" +failure = "0.1" libimagrt = { version = "0.9.0", path = "../../../lib/core/libimagrt" } libimagerror = { version = "0.9.0", path = "../../../lib/core/libimagerror" } diff --git a/bin/domain/imag-todo/src/main.rs b/bin/domain/imag-todo/src/main.rs index 622bcce2..21e477cc 100644 --- a/bin/domain/imag-todo/src/main.rs +++ b/bin/domain/imag-todo/src/main.rs @@ -37,6 +37,7 @@ extern crate clap; extern crate toml; extern crate toml_query; #[macro_use] extern crate is_match; +extern crate failure; #[macro_use] extern crate libimagrt; extern crate libimagerror; @@ -45,6 +46,7 @@ extern crate libimagtodo; use std::process::{Command, Stdio}; use std::io::stdin; use std::io::Write; +use failure::Error; use libimagrt::runtime::Runtime; use libimagrt::setup::generate_runtime_setup; @@ -119,7 +121,7 @@ fn list(rt: &Runtime) { // return Result instead of Result>, which is a real inconvenience. // let no_identifier = |e: &::toml_query::error::Error| -> bool { - is_match!(e.kind(), &::toml_query::error::ErrorKind::IdentifierNotFoundInDocument(_)) + is_match!(e, &::toml_query::error::Error::IdentifierNotFoundInDocument(_)) }; let res = rt.store().all_tasks() // get all tasks @@ -136,7 +138,7 @@ fn list(rt: &Runtime) { }, Err(e) => { if !no_identifier(&e) { - trace_error(&e); + trace_error(&Error::from(e)); } None }