summaryrefslogtreecommitdiffstats
path: root/src/matcher.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-10-30 13:25:33 +0100
committerMatthias Beyer <mail@beyermatthias.de>2018-11-07 18:11:27 +0100
commit6c25067ba3218abbd9c4e60467559edd4d923deb (patch)
tree4d96140108936d0f40c16a96a2874fa384125e61 /src/matcher.rs
parentd100fc8d0f456acfd33151de0b6225b6bf601717 (diff)
Move code to failure as error handling library
Diffstat (limited to 'src/matcher.rs')
-rw-r--r--src/matcher.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/matcher.rs b/src/matcher.rs
index d574090..ca4fb8d 100644
--- a/src/matcher.rs
+++ b/src/matcher.rs
@@ -1,9 +1,9 @@
use chrono::Datelike;
-use error::KairosError as KE;
-use error::KairosErrorKind as KEK;
-use error::Result;
+use error::ErrorKind as KEK;
+use failure::Fallible as Result;
+use failure::Error;
use indicator::Day;
use indicator::Month;
use timetype::TimeType;
@@ -19,7 +19,7 @@ impl Matcher for Day {
let this : ::chrono::Weekday = self.clone().into();
tt.get_moment()
.map(|mom| this == mom.weekday())
- .ok_or(KE::from_kind(KEK::ArgumentErrorNotAMoment(tt.name())))
+ .ok_or(Error::from(KEK::ArgumentErrorNotAMoment(tt.name())))
}
}
@@ -29,7 +29,7 @@ impl Matcher for Month {
let this : u32 = self.clone().into();
tt.get_moment()
.map(|mom| this == mom.month())
- .ok_or(KE::from_kind(KEK::ArgumentErrorNotAMoment(tt.name())))
+ .ok_or(Error::from(KEK::ArgumentErrorNotAMoment(tt.name())))
}
}