From bc585647159fac0b7d2d4e147b50c44555fa0f79 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 5 Mar 2020 19:51:22 +0100 Subject: Remove unused import Signed-off-by: Matthias Beyer --- src/parser/iterator.rs | 1 - 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, 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 { 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::() { - 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::() { - Some(&ErrorKind::CannotSub(..)) => true, + assert!(match res { + Error::CannotSub(..) => true, _ => false, }); } -- cgit v1.2.3