summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/config.rs b/src/config.rs
index 893baea..03d2453 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -10,7 +10,7 @@ use ser::ConfigSerializer;
use source::Source;
use path;
-use value::{Value, ValueKind, ValueWithKey};
+use value::{Table, Value, ValueKind, ValueWithKey};
#[derive(Clone, Debug)]
enum ConfigKind {
@@ -49,7 +49,12 @@ pub struct Config {
impl Config {
pub fn new() -> Self {
- Config::default()
+ Self {
+ kind: ConfigKind::default(),
+ // Config root should be instantiated as an empty table
+ // to avoid deserialization errors.
+ cache: Value::new(None, Table::new()),
+ }
}
/// Merge in a configuration property source.