From 29f32b458c34b94826941f7cb5db6c6c7e7dfb64 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 25 Sep 2024 11:14:06 -0700 Subject: [PATCH] Deny unknown fields in wasm-smith configuration This helps catch typos in configuration such as using `foo_bar` instead of `foo-bar`. --- crates/wasm-smith/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/wasm-smith/src/config.rs b/crates/wasm-smith/src/config.rs index 97c707a0e1..451adcb266 100644 --- a/crates/wasm-smith/src/config.rs +++ b/crates/wasm-smith/src/config.rs @@ -116,7 +116,7 @@ macro_rules! define_config { #[cfg(feature = "_internal_cli")] #[doc(hidden)] #[derive(Clone, Debug, Default, clap::Parser, serde_derive::Deserialize)] - #[serde(rename_all = "kebab-case")] + #[serde(rename_all = "kebab-case", deny_unknown_fields)] pub struct InternalOptionalConfig { /// The imports that may be used when generating the module. ///