summaryrefslogtreecommitdiffstats
path: root/src/timetype.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/timetype.rs')
-rw-r--r--src/timetype.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/timetype.rs b/src/timetype.rs
index 8fdd1d1..818ad4b 100644
--- a/src/timetype.rs
+++ b/src/timetype.rs
@@ -1182,7 +1182,7 @@ fn sub_from_moment(mom: NaiveDateTime, tt: TimeType) -> Result<TimeType> {
mod tests {
use chrono::NaiveDate;
use super::TimeType as TT;
- use error::ErrorKind;
+ use error::Error;
#[test]
fn test_addition_of_seconds() {
@@ -1897,8 +1897,8 @@ mod tests {
assert!(res.is_err());
let res = res.unwrap_err();
- assert!(match res.downcast_ref::<ErrorKind>() {
- Some(&ErrorKind::CannotAdd(..)) => true,
+ assert!(match res {
+ Error::CannotAdd(..) => true,
_ => false,
});
}
@@ -1913,8 +1913,8 @@ mod tests {
assert!(res.is_err());
let res = res.unwrap_err();
- assert!(match res.downcast_ref::<ErrorKind>() {
- Some(&ErrorKind::CannotSub(..)) => true,
+ assert!(match res {
+ Error::CannotSub(..) => true,
_ => false,
});
}