From fa93cf9a6b699b9a7598a13d0fd411df0cc20815 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Mon, 16 Mar 2026 22:59:30 +0100 Subject: [PATCH] deny unknown fields in config --- src/types/mod_config.rs | 1 + src/types/root_config.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/types/mod_config.rs b/src/types/mod_config.rs index b00fead..32cb73f 100644 --- a/src/types/mod_config.rs +++ b/src/types/mod_config.rs @@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize}; /// Config for an available mod #[derive(Debug, Clone, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] pub struct ModConfig { /// ID of the mod #[serde(skip)] diff --git a/src/types/root_config.rs b/src/types/root_config.rs index 9b0a20b..2b58306 100644 --- a/src/types/root_config.rs +++ b/src/types/root_config.rs @@ -11,6 +11,7 @@ use serde::{Deserialize, Serialize}; use crate::types::{ConfigReadWriteError, ModConfig, game::Game, modded_instance::ModdedInstance}; #[derive(Debug, Clone, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] pub struct RootConfig { #[serde(default)] games: HashMap,