From 011b809e104242f7fe9f6c00a54804b1cf0e125c Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Sun, 30 Jul 2017 13:46:04 -0700 Subject: Impl Config for Source to allow merging whole configs; closes #28 --- src/config.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index 0ff2601..f890461 100644 --- a/src/config.rs +++ b/src/config.rs @@ -190,3 +190,13 @@ impl Config { self.get(key).and_then(Value::into_array) } } + +impl Source for Config { + fn clone_into_box(&self) -> Box { + Box::new((*self).clone()) + } + + fn collect(&self) -> Result> { + self.cache.clone().into_table() + } +} -- cgit v1.2.3