diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2017-11-19 15:14:42 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2017-11-19 15:15:17 +0100 |
commit | 3226a957d5f28c8775f114368211b399f6f6c491 (patch) | |
tree | 473e94f8da3347d22fb35696d78b46c0dc9419a1 /src/parser/timetype.rs | |
parent | 633e1a707da7bc93191c7dfd8090a5ed91a19607 (diff) |
Remove warnings
* Remove unused imports
* Remove unused variables
* Remove unused functions
Diffstat (limited to 'src/parser/timetype.rs')
-rw-r--r-- | src/parser/timetype.rs | 21 |
1 files changed, 5 insertions, 16 deletions
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<i64>, alt!( map_res!( @@ -131,15 +129,6 @@ impl Into<timetype::TimeType> for AmountExpr { } } -impl AmountExpr { - fn new(amount: Amount, next: Option<(Operator, Box<AmountExpr>)>) -> 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<timetype::TimeType> 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<timetype::TimeType> 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!() }, }; |