From 07f108e1d25da387735ce2ddca04a768a2739d9f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 5 Mar 2020 19:48:58 +0100 Subject: Replace failure with thiserror Signed-off-by: Matthias Beyer --- src/matcher.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/matcher.rs') diff --git a/src/matcher.rs b/src/matcher.rs index ca4fb8d..2676201 100644 --- a/src/matcher.rs +++ b/src/matcher.rs @@ -1,9 +1,8 @@ use chrono::Datelike; -use error::ErrorKind as KEK; -use failure::Fallible as Result; -use failure::Error; +use error::Error; +use error::Result; use indicator::Day; use indicator::Month; use timetype::TimeType; @@ -19,7 +18,7 @@ impl Matcher for Day { let this : ::chrono::Weekday = self.clone().into(); tt.get_moment() .map(|mom| this == mom.weekday()) - .ok_or(Error::from(KEK::ArgumentErrorNotAMoment(tt.name()))) + .ok_or(Error::ArgumentErrorNotAMoment(tt.name())) } } @@ -29,7 +28,7 @@ impl Matcher for Month { let this : u32 = self.clone().into(); tt.get_moment() .map(|mom| this == mom.month()) - .ok_or(Error::from(KEK::ArgumentErrorNotAMoment(tt.name()))) + .ok_or(Error::ArgumentErrorNotAMoment(tt.name())) } } -- cgit v1.2.3