diff options
author | Ryan Leckey <leckey.ryan@gmail.com> | 2017-02-12 11:04:30 -0800 |
---|---|---|
committer | Ryan Leckey <leckey.ryan@gmail.com> | 2017-02-12 11:04:30 -0800 |
commit | e29748b255ce97dfe9b4efcfbc4d9bcb3d694b97 (patch) | |
tree | 1b544db4cee3b392463edda743c3513c73f73459 /src/config.rs | |
parent | e0fe3e151c24ab81f8d232b3e18841acacc3656e (diff) |
Decorate Box<Source> with Send + Sync
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config.rs b/src/config.rs index 403f566..ad4cda2 100644 --- a/src/config.rs +++ b/src/config.rs @@ -29,7 +29,7 @@ enum ConfigStore { overrides: HashMap<String, Value>, // Ordered list of sources - sources: Vec<Box<Source>>, + sources: Vec<Box<Source + Send + Sync>>, }, // TODO: Will be used for frozen configuratino soon @@ -213,7 +213,7 @@ fn path_set_str(root: &mut HashMap<String, Value>, key: &str, value: &Value) { impl ConfigStore { fn merge<T>(&mut self, source: T) -> Result<(), Box<Error>> - where T: SourceBuilder + where T: SourceBuilder + Send + Sync { if let ConfigStore::Mutable { ref mut sources, .. } = *self { sources.push(source.build()?); @@ -285,7 +285,7 @@ impl Config { /// Merge in configuration values from the given source. pub fn merge<T>(&mut self, source: T) -> Result<(), Box<Error>> - where T: SourceBuilder + where T: SourceBuilder + Send + Sync { self.store.merge(source)?; self.refresh()?; |