diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-03-05 20:18:58 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-03-05 20:18:58 +0100 |
commit | a0bad9c82337ab7dd273a7bd3d2393541aa2cb74 (patch) | |
tree | c6c571da4aae32b18c539a850d7f740b0c3a60b5 /src/matcher.rs | |
parent | 13b22a534c6adc2f6dc6e651c3c69bd878dc6c0f (diff) | |
parent | bc585647159fac0b7d2d4e147b50c44555fa0f79 (diff) |
Merge branch 'thiserror'
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/matcher.rs')
-rw-r--r-- | src/matcher.rs | 9 |
1 files changed, 4 insertions, 5 deletions
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())) } } |