diff options
Diffstat (limited to 'bin/core/imag-markdown')
-rw-r--r-- | bin/core/imag-markdown/Cargo.toml | 2 | ||||
-rw-r--r-- | bin/core/imag-markdown/src/lib.rs | 12 | ||||
-rw-r--r-- | bin/core/imag-markdown/src/ui.rs | 2 |
3 files changed, 8 insertions, 8 deletions
diff --git a/bin/core/imag-markdown/Cargo.toml b/bin/core/imag-markdown/Cargo.toml index 22f46c38..eb5615d6 100644 --- a/bin/core/imag-markdown/Cargo.toml +++ b/bin/core/imag-markdown/Cargo.toml @@ -22,7 +22,7 @@ maintenance = { status = "actively-developed" } [dependencies] log = "0.4.6" -failure = "0.1.5" +anyhow = "1" resiter = "0.4.0" libimagstore = { version = "0.10.0", path = "../../../lib/core/libimagstore" } diff --git a/bin/core/imag-markdown/src/lib.rs b/bin/core/imag-markdown/src/lib.rs index 1a8610b5..38303be6 100644 --- a/bin/core/imag-markdown/src/lib.rs +++ b/bin/core/imag-markdown/src/lib.rs @@ -36,7 +36,7 @@ extern crate clap; #[macro_use] extern crate log; -extern crate failure; +#[macro_use] extern crate anyhow; extern crate resiter; extern crate libimagerror; @@ -45,9 +45,9 @@ extern crate libimagstore; use std::io::Write; -use failure::Error; -use failure::err_msg; -use failure::Fallible as Result; +use anyhow::Error; + +use anyhow::Result; use resiter::AndThen; use resiter::Map; use resiter::IterInnerOkOrElse; @@ -72,11 +72,11 @@ impl ImagApplication for ImagMarkdown { let iter = rt .ids::<crate::ui::PathProvider>()? - .ok_or_else(|| err_msg("No ids supplied"))? + .ok_or_else(|| anyhow!("No ids supplied"))? .into_iter() .map(Ok) .into_get_iter(rt.store()) - .map_inner_ok_or_else(|| err_msg("Entry does not exist but is in store. This is a BUG, please report!")); + .map_inner_ok_or_else(|| anyhow!("Entry does not exist but is in store. This is a BUG, please report!")); if only_links { debug!("Printing only links"); diff --git a/bin/core/imag-markdown/src/ui.rs b/bin/core/imag-markdown/src/ui.rs index a7e7b73e..a03f0491 100644 --- a/bin/core/imag-markdown/src/ui.rs +++ b/bin/core/imag-markdown/src/ui.rs @@ -20,7 +20,7 @@ use std::path::PathBuf; use clap::{Arg, ArgMatches, App}; -use failure::Fallible as Result; +use anyhow::Result; use libimagstore::storeid::StoreId; use libimagstore::storeid::IntoStoreId; |