From 40ba114e61485a8897eabf91d3a44e32b4b77791 Mon Sep 17 00:00:00 2001 From: Jonathan Krebs Date: Fri, 13 Dec 2024 15:02:51 +0100 Subject: [PATCH] fix warnings: at the moment configuration by environment variables is not implemented --- bffhd/config/mod.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/bffhd/config/mod.rs b/bffhd/config/mod.rs index dfce376..fba5f64 100644 --- a/bffhd/config/mod.rs +++ b/bffhd/config/mod.rs @@ -38,13 +38,15 @@ pub fn read(file: impl AsRef) -> Result { if !path.is_file() { return Err(ConfigError::NotAFile(path.to_string_lossy().to_string())); } - let mut config = dhall::read_config_file(file)?; - for (envvar, value) in std::env::vars() { - match envvar.as_str() { - // Do things like this? - // "BFFH_LOG" => config.logging.filter = Some(value), - _ => {} - } - } + let config = dhall::read_config_file(file)?; + // TODO: configuration by environment variables? + // but rather in in a separate function + // for (envvar, value) in std::env::vars() { + // match envvar.as_str() { + // // Do things like this? + // // "BFFH_LOG" => config.logging.filter = Some(value), + // _ => {} + // } + // } Ok(config) }