(cfg_name: &str, user_dir: bool, readonly: bool)
| 204 | } |
| 205 | |
| 206 | pub fn load(cfg_name: &str, user_dir: bool, readonly: bool) -> Result<Self> { |
| 207 | let mut config_path = Self::get_config_dir(user_dir)?; |
| 208 | config_path.push(cfg_name); |
| 209 | |
| 210 | Self::from_file(&config_path, readonly) |
| 211 | } |
| 212 | |
| 213 | pub fn set(&mut self, key: &str, value: &str) -> Result<()> { |
| 214 | let option = ConfigOption::from_str(key)?; |
no outgoing calls
no test coverage detected