From 7ddf08e8b7c0cbdb979f4c7f58e7c926bd010dee Mon Sep 17 00:00:00 2001
From: strawberry <strawberry@puppygock.gay>
Date: Thu, 8 Feb 2024 19:44:36 -0500
Subject: [PATCH] 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>
---
 src/config/mod.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/config/mod.rs b/src/config/mod.rs
index 9fc0e4cc2..d6bb10065 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -176,7 +176,9 @@ pub fn warn_deprecated(&self) {
     /// 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);
         }
     }
-- 
GitLab