diff options
Diffstat (limited to 'bin/domain/imag-calendar/src/filters.rs')
-rw-r--r-- | bin/domain/imag-calendar/src/filters.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/domain/imag-calendar/src/filters.rs b/bin/domain/imag-calendar/src/filters.rs index 7e452e94..d57d2129 100644 --- a/bin/domain/imag-calendar/src/filters.rs +++ b/bin/domain/imag-calendar/src/filters.rs @@ -18,7 +18,7 @@ // use chrono::NaiveDateTime; -use failure::Fallible as Result; +use anyhow::Result; use vobject::icalendar::Event; use libimagerror::trace::MapErrTrace; @@ -35,7 +35,7 @@ pub fn event_is_before<'a>(event: &Event<'a>, before_spec: &NaiveDateTime) -> bo Ok(result) }) .unwrap_or_else(|| Err({ - format_err!("Entry with UID {} has no end time, cannot determine whether to list it", + anyhow!("Entry with UID {} has no end time, cannot determine whether to list it", uid()) })); @@ -47,7 +47,7 @@ pub fn event_is_before<'a>(event: &Event<'a>, before_spec: &NaiveDateTime) -> bo Ok(result) }) .unwrap_or_else(|| Err({ - format_err!("Entry with UID {} has no timestamp, cannot determine whether to list it", + anyhow!("Entry with UID {} has no timestamp, cannot determine whether to list it", uid()) })); @@ -72,6 +72,6 @@ fn try_to_parse_datetime(s: &str) -> Result<NaiveDateTime> { ]; ::libimagutil::date::try_to_parse_datetime_from_string(s, FORMATS.iter()) - .ok_or_else(|| format_err!("Cannot parse datetime: {}", s)) + .ok_or_else(|| anyhow!("Cannot parse datetime: {}", s)) } |