diff options
-rw-r--r-- | src/parser/iterator.rs | 1 | ||||
-rw-r--r-- | src/timetype.rs | 10 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/parser/iterator.rs b/src/parser/iterator.rs index be814b0..7d3007c 100644 --- a/src/parser/iterator.rs +++ b/src/parser/iterator.rs @@ -6,7 +6,6 @@ use parser::timetype::*; use timetype::IntoTimeType; use timetype; use iter; -use error; named!(pub iter_spec<Iterspec>, alt_complete!( tag!("secondly") => { |_| Iterspec::Secondly } | 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, }); } |