From 3226a957d5f28c8775f114368211b399f6f6c491 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 19 Nov 2017 15:14:42 +0100 Subject: Remove warnings * Remove unused imports * Remove unused variables * Remove unused functions --- src/parser/timetype.rs | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'src/parser/timetype.rs') diff --git a/src/parser/timetype.rs b/src/parser/timetype.rs index bf2422a..935f18a 100644 --- a/src/parser/timetype.rs +++ b/src/parser/timetype.rs @@ -1,13 +1,11 @@ use std::str; use std::str::FromStr; -use nom::{IResult, space, alpha, alphanumeric, digit}; +use nom::digit; use nom::whitespace::sp; use chrono::NaiveDate; use timetype; -use iter; -use error; named!(pub integer, alt!( map_res!( @@ -131,15 +129,6 @@ impl Into for AmountExpr { } } -impl AmountExpr { - fn new(amount: Amount, next: Option<(Operator, Box)>) -> AmountExpr { - AmountExpr { - amount: amount, - next: next - } - } -} - use iso8601::parsers::parse_date; use iso8601::parsers::parse_datetime; // The order is relevant here, because datetime is longer than date, we must parse datetime before @@ -172,10 +161,10 @@ impl Into for ExactDate { ::iso8601::Date::YMD { year, month, day } => { (year, month, day) }, - ::iso8601::Date::Week { year, ww, d } => { + ::iso8601::Date::Week { /* year, ww, d */ .. } => { unimplemented!() }, - ::iso8601::Date::Ordinal { year, ddd } => { + ::iso8601::Date::Ordinal { /* year, ddd */ .. } => { unimplemented!() }, }; @@ -189,10 +178,10 @@ impl Into for ExactDate { ::iso8601::Date::YMD { year, month, day } => { (year, month, day) }, - ::iso8601::Date::Week { year, ww, d } => { + ::iso8601::Date::Week { /* year, ww, d */ .. } => { unimplemented!() }, - ::iso8601::Date::Ordinal { year, ddd } => { + ::iso8601::Date::Ordinal { /* year, ddd */ .. } => { unimplemented!() }, }; -- cgit v1.2.3