diff options
Diffstat (limited to 'lib/core/libimagrt/src')
-rw-r--r-- | lib/core/libimagrt/src/configuration.rs | 7 | ||||
-rw-r--r-- | lib/core/libimagrt/src/lib.rs | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/core/libimagrt/src/configuration.rs b/lib/core/libimagrt/src/configuration.rs index dcb3326b..bc3b52b4 100644 --- a/lib/core/libimagrt/src/configuration.rs +++ b/lib/core/libimagrt/src/configuration.rs @@ -133,7 +133,8 @@ impl Configuration { use self::error::ConfigErrorKind as CEK; use self::error::MapErrInto; use libimagerror::into::IntoError; - use libimagstore::toml_ext::TomlValueExt; + + use toml_query::read::TomlValueReadExt; v.into_iter() .map(|s| { debug!("Trying to process '{}'", s); s }) @@ -170,10 +171,10 @@ impl Configuration { /// Returns None if string cannot be converted. /// /// Arrays and Tables are not supported and will yield `None`. -fn into_value(value: Value, s: String) -> Option<Value> { +fn into_value(value: &Value, s: String) -> Option<Value> { use std::str::FromStr; - match value { + match *value { Value::String(_) => Some(Value::String(s)), Value::Integer(_) => FromStr::from_str(&s[..]).ok().map(Value::Integer), Value::Float(_) => FromStr::from_str(&s[..]).ok().map(Value::Float), diff --git a/lib/core/libimagrt/src/lib.rs b/lib/core/libimagrt/src/lib.rs index 55398013..a28b525f 100644 --- a/lib/core/libimagrt/src/lib.rs +++ b/lib/core/libimagrt/src/lib.rs @@ -42,6 +42,7 @@ extern crate ansi_term; extern crate clap; extern crate toml; +extern crate toml_query; #[macro_use] extern crate is_match; extern crate libimagstore; |