(&mut self, content: &str)
| 29 | } |
| 30 | |
| 31 | pub fn load_from_str(&mut self, content: &str) -> Result<()> { |
| 32 | let config: Config = |
| 33 | parse_jsonc(content).with_context(|| "Failed to parse config content")?; |
| 34 | self.config.merge(config); |
| 35 | Ok(()) |
| 36 | } |
| 37 | |
| 38 | pub fn load_from_file<P: AsRef<Path>>(&mut self, path: P) -> Result<()> { |
| 39 | let path = path.as_ref(); |