diff --git a/src/rust/commons/src/config.rs b/src/rust/commons/src/config.rs
index ee5a14e828129220e5740a80f6f14b0a9953b639..15198f4b3c1edca7f7dda73c341b17f365f4a77e 100644
--- a/src/rust/commons/src/config.rs
+++ b/src/rust/commons/src/config.rs
@@ -10,11 +10,10 @@ where
     match std::fs::read_to_string(&path) {
         Ok(config) => {
             let config = Box::leak(String::into_boxed_str(config));
-            let config = toml::from_str::<Config>(config).map_err(|err| {
+            toml::from_str::<Config>(config).map_err(|err| {
                 let path = path.to_string_lossy();
                 format!("invalid config file `{path}`: {err}")
-            })?;
-            Ok(config)
+            })
         }
 
         Err(_) => {