From c798fd881fa8652e5d9ea2873babed55da1ad05f Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Thu, 22 Jun 2017 23:10:56 -0700 Subject: Add a test to ensure we can get dates out of config --- src/file/format/mod.rs | 5 +++++ src/file/format/toml.rs | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/file/format/mod.rs b/src/file/format/mod.rs index 1988513..366fa45 100644 --- a/src/file/format/mod.rs +++ b/src/file/format/mod.rs @@ -1,3 +1,7 @@ +// If no features are used, there is an "unused mut" warning in `ALL_EXTENSIONS` +// BUG: ? For some reason this doesn't do anything if I try and function scope this +#![allow(unused_mut)] + use source::Source; use value::Value; use std::error::Error; @@ -29,6 +33,7 @@ pub enum FileFormat { lazy_static! { #[doc(hidden)] + // #[allow(unused_mut)] ? pub static ref ALL_EXTENSIONS: HashMap> = { let mut formats: HashMap> = HashMap::new(); diff --git a/src/file/format/toml.rs b/src/file/format/toml.rs index 6c835a4..cecad75 100644 --- a/src/file/format/toml.rs +++ b/src/file/format/toml.rs @@ -42,9 +42,6 @@ fn from_toml_value(uri: Option<&String>, value: &toml::Value) -> Value { Value::new(uri, l) } - _ => { - // TODO: DateTime - unimplemented!(); - } + toml::Value::Datetime(ref datetime) => Value::new(uri, datetime.to_string()), } } -- cgit v1.2.3