summaryrefslogtreecommitdiffstats
path: root/bin/domain/imag-diary/src/list.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-03-08 12:06:42 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-03-08 12:06:42 +0100
commitcb9f6e7f46eb1a05071947d5f28bb1fe45313734 (patch)
tree6e5a8e08e5b204f202de335d412de3f69196ce12 /bin/domain/imag-diary/src/list.rs
parent00aa4df88edae1d5eeb3fb365af05f95bd0de3b4 (diff)
parent666193dfc26181b6606cb85de5389c4ed6ece5eb (diff)
Merge branch 'replace-failure-with-anyhow'
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin/domain/imag-diary/src/list.rs')
-rw-r--r--bin/domain/imag-diary/src/list.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/domain/imag-diary/src/list.rs b/bin/domain/imag-diary/src/list.rs
index 9b4a6b7e..d047d83b 100644
--- a/bin/domain/imag-diary/src/list.rs
+++ b/bin/domain/imag-diary/src/list.rs
@@ -19,9 +19,9 @@
use std::io::Write;
-use failure::Fallible as Result;
-use failure::err_msg;
-use failure::Error;
+use anyhow::Result;
+
+use anyhow::Error;
use resiter::AndThen;
use libimagdiary::diary::Diary;
@@ -34,7 +34,7 @@ use crate::util::get_diary_name;
pub fn list(rt: &Runtime) -> Result<()> {
let diaryname = get_diary_name(rt)
- .ok_or_else(|| err_msg("No diary selected. Use either the configuration file or the commandline option"))?;
+ .ok_or_else(|| anyhow!("No diary selected. Use either the configuration file or the commandline option"))?;
let mut ids = Diary::entries(rt.store(), &diaryname)?
.and_then_ok(|id| DiaryId::from_storeid(&id))