slight cleanup

This commit is contained in:
Cooper Quintin
2024-01-19 15:32:01 -08:00
parent 64bcd32aeb
commit 28d9377a08
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -19,7 +19,7 @@ pub struct Config {
impl Default for Config {
fn default() -> Self {
Config {
qmdl_store_path: "/data/wavehunter".to_string(),
qmdl_store_path: "/data/wavehunter/qmdl".to_string(),
port: 8080,
readonly_mode: false,
}
@@ -33,7 +33,7 @@ pub fn parse_config<P>(path: P) -> Result<Config, WavehunterError> where P: AsRe
.map_err(WavehunterError::ConfigFileParsingError)?;
if let Some(path) = parsed_config.qmdl_store_path { config.qmdl_store_path = path }
if let Some(port) = parsed_config.port { config.port = port }
if let Some(debug_mode) = parsed_config.readonly_mode { config.readonly_mode = debug_mode }
if let Some(readonly_mode) = parsed_config.readonly_mode { config.readonly_mode = readonly_mode }
}
Ok(config)
}