filter out "config" as it's an expected config option

this seems to exist when using `CONDUIT_CONFIG`
environment variable, this is expected.

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-02-08 19:44:36 -05:00 committed by June
parent 6996d63a02
commit 7ddf08e8b7

View file

@ -176,7 +176,9 @@ impl Config {
/// iterates over all the catchall keys (unknown config options) and warns if there are any.
pub fn warn_unknown_key(&self) {
debug!("Checking for unknown config keys");
for key in self.catchall.keys() {
for key in self.catchall.keys().filter(
|key| "config".to_owned().ne(key.to_owned()), /* "config" is expected */
) {
warn!("Config parameter \"{}\" is unknown to conduwuit.", key);
}
}