diff --git a/src/common/input/config.rs b/src/common/input/config.rs index 0713e54e..4bb9e10f 100644 --- a/src/common/input/config.rs +++ b/src/common/input/config.rs @@ -79,6 +79,7 @@ impl Config { } /// Entry point of the configuration + #[cfg(not(test))] pub fn from_cli_config(cli_config: Option) -> ConfigResult { match cli_config { Some(ConfigCli::Config { clean, .. }) if clean => Ok(Config::default()), @@ -88,6 +89,13 @@ impl Config { Some(_) | None => Ok(Config::from_default_path()?), } } + + //#[allow(unused_must_use)] + /// In order not to mess up tests from changing configurations + #[cfg(test)] + pub fn from_cli_config(_: Option) -> ConfigResult { + Ok(Config::default()) + } } impl Display for ConfigError {