diff --git a/lib/core/libimagrt/src/lib.rs b/lib/core/libimagrt/src/lib.rs index 4247ff6c..ebe8f4fc 100644 --- a/lib/core/libimagrt/src/lib.rs +++ b/lib/core/libimagrt/src/lib.rs @@ -37,17 +37,17 @@ while_true, )] -#[macro_use] extern crate log; +extern crate log; extern crate itertools; extern crate ansi_term; extern crate handlebars; extern crate serde; #[macro_use] extern crate serde_derive; #[macro_use] extern crate failure; +#[macro_use] extern crate toml_query; extern crate clap; extern crate toml; -extern crate toml_query; extern crate atty; extern crate libimagstore; diff --git a/lib/core/libimagrt/src/logger.rs b/lib/core/libimagrt/src/logger.rs index e7c03315..ebb9ec49 100644 --- a/lib/core/libimagrt/src/logger.rs +++ b/lib/core/libimagrt/src/logger.rs @@ -349,7 +349,6 @@ mod log_lvl_aggregate { fn aggregate_module_settings(_matches: &ArgMatches, config: Option<&Value>) -> Result> { - use toml_query::read::Partial; use std::convert::TryInto; // @@ -369,14 +368,10 @@ fn aggregate_module_settings(_matches: &ArgMatches, config: Option<&Value>) pub enabled: bool, } - #[derive(Serialize, Deserialize, Debug)] + #[derive(Partial, Serialize, Deserialize, Debug)] + #[location = "imag.logging.modules"] struct LoggingModuleConfigMap(BTreeMap); - impl<'a> Partial<'a> for LoggingModuleConfigMap { - const LOCATION: &'static str = "imag.logging.modules"; - type Output = Self; - } - impl TryInto> for LoggingModuleConfigMap { type Error = Error;