diff options
Diffstat (limited to 'bin/core/imag-ids')
-rw-r--r-- | bin/core/imag-ids/Cargo.toml | 2 | ||||
-rw-r--r-- | bin/core/imag-ids/src/lib.rs | 8 | ||||
-rw-r--r-- | bin/core/imag-ids/src/ui.rs | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/bin/core/imag-ids/Cargo.toml b/bin/core/imag-ids/Cargo.toml index 036f3a06..8095decd 100644 --- a/bin/core/imag-ids/Cargo.toml +++ b/bin/core/imag-ids/Cargo.toml @@ -23,7 +23,7 @@ maintenance = { status = "actively-developed" } log = "0.4.6" toml = "0.5.1" toml-query = "0.9.2" -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-ids/src/lib.rs b/bin/core/imag-ids/src/lib.rs index 9d716a50..2994fb2e 100644 --- a/bin/core/imag-ids/src/lib.rs +++ b/bin/core/imag-ids/src/lib.rs @@ -38,7 +38,7 @@ extern crate clap; #[macro_use] extern crate log; extern crate toml; extern crate toml_query; -#[macro_use] extern crate failure; +#[macro_use] extern crate anyhow; extern crate resiter; #[cfg(test)] @@ -50,8 +50,8 @@ extern crate libimagrt; use std::io::Write; -use failure::Fallible as Result; -use failure::err_msg; +use anyhow::Result; + use resiter::Map; use resiter::AndThen; use clap::App; @@ -99,7 +99,7 @@ impl ImagApplication for ImagIds { if rt.ids_from_stdin() { debug!("Fetching IDs from stdin..."); let mut 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); diff --git a/bin/core/imag-ids/src/ui.rs b/bin/core/imag-ids/src/ui.rs index 94f966c6..9c8a0379 100644 --- a/bin/core/imag-ids/src/ui.rs +++ b/bin/core/imag-ids/src/ui.rs @@ -18,7 +18,7 @@ // use clap::{Arg, ArgMatches, App}; -use failure::Fallible as Result; +use anyhow::Result; use libimagstore::storeid::StoreId; use libimagrt::runtime::IdPathProvider; @@ -36,6 +36,6 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> { pub struct PathProvider; impl IdPathProvider for PathProvider { fn get_ids(_matches: &ArgMatches) -> Result<Option<Vec<StoreId>>> { - Err(format_err!("imag-ids does not get IDs via CLI, only via stdin if applying a filter!")) + Err(anyhow!("imag-ids does not get IDs via CLI, only via stdin if applying a filter!")) } } |