fix warnings: at the moment configuration by environment variables is not implemented

This commit is contained in:
Jonathan Krebs 2024-12-13 15:02:51 +01:00
parent c2c34ede67
commit 40ba114e61

View File

@ -38,13 +38,15 @@ pub fn read(file: impl AsRef<Path>) -> Result<Config, ConfigError> {
if !path.is_file() { if !path.is_file() {
return Err(ConfigError::NotAFile(path.to_string_lossy().to_string())); return Err(ConfigError::NotAFile(path.to_string_lossy().to_string()));
} }
let mut config = dhall::read_config_file(file)?; let config = dhall::read_config_file(file)?;
for (envvar, value) in std::env::vars() { // TODO: configuration by environment variables?
match envvar.as_str() { // but rather in in a separate function
// Do things like this? // for (envvar, value) in std::env::vars() {
// "BFFH_LOG" => config.logging.filter = Some(value), // match envvar.as_str() {
_ => {} // // Do things like this?
} // // "BFFH_LOG" => config.logging.filter = Some(value),
} // _ => {}
// }
// }
Ok(config) Ok(config)
} }