summaryrefslogtreecommitdiffstats
path: root/bin/core/imag-edit
diff options
context:
space:
mode:
Diffstat (limited to 'bin/core/imag-edit')
-rw-r--r--bin/core/imag-edit/Cargo.toml2
-rw-r--r--bin/core/imag-edit/src/lib.rs10
-rw-r--r--bin/core/imag-edit/src/ui.rs2
3 files changed, 7 insertions, 7 deletions
diff --git a/bin/core/imag-edit/Cargo.toml b/bin/core/imag-edit/Cargo.toml
index 2ec48cfc..5e7a0df7 100644
--- a/bin/core/imag-edit/Cargo.toml
+++ b/bin/core/imag-edit/Cargo.toml
@@ -24,7 +24,7 @@ log = "0.4.6"
version = "3.0.0"
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-edit/src/lib.rs b/bin/core/imag-edit/src/lib.rs
index d86e7b37..29239e38 100644
--- a/bin/core/imag-edit/src/lib.rs
+++ b/bin/core/imag-edit/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 libimagentryedit;
@@ -52,8 +52,8 @@ use libimagrt::application::ImagApplication;
use libimagrt::iter::ReportTouchedResultEntry;
use libimagstore::iter::get::StoreIdGetIteratorExtension;
-use failure::Fallible as Result;
-use failure::err_msg;
+use anyhow::Result;
+
use resiter::AndThen;
use resiter::IterInnerOkOrElse;
use clap::App;
@@ -71,11 +71,11 @@ impl ImagApplication for ImagEdit {
let edit_header_only = rt.cli().is_present("edit-header-only");
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("Did not find one entry"))
+ .map_inner_ok_or_else(|| anyhow!("Did not find one entry"))
.inspect(|e| debug!("Editing = {:?}", e))
.map_report_touched(&rt)
.and_then_ok(|mut entry| {
diff --git a/bin/core/imag-edit/src/ui.rs b/bin/core/imag-edit/src/ui.rs
index f13b8fc6..5a195a22 100644
--- a/bin/core/imag-edit/src/ui.rs
+++ b/bin/core/imag-edit/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::IntoStoreId;
use libimagstore::storeid::StoreId;