1
0
mirror of https://github.com/bspeice/dtparse synced 2024-11-12 17:08:09 -05:00
This commit is contained in:
Bradlee Speice 2019-11-29 17:58:40 -05:00
parent d5e0a5d46a
commit d7ff381d7f

View File

@ -84,10 +84,7 @@ use chrono::Local;
use chrono::NaiveDate;
use chrono::NaiveDateTime;
use chrono::NaiveTime;
use chrono::Offset;
use chrono::TimeZone;
use chrono::Timelike;
use chrono_tz::Tz;
use num_traits::cast::ToPrimitive;
use rust_decimal::Decimal;
use rust_decimal::Error as DecimalError;
@ -976,7 +973,7 @@ impl Parser {
Ok(Some(FixedOffset::east(
*tzinfos.get(res.tzname.as_ref().unwrap()).unwrap(),
)))
} else if res.tzname.is_some() {
} else if let Some(tzname) = res.tzname.as_ref() {
println!("tzname {} identified but not understood.", tzname);
Ok(None)
} else {