Skip to content

Commit 13d482a

Browse files
committed
Address derive_deserialize_allowing_unknown errors
1 parent 490f802 commit 13d482a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_config/src/types.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use std::collections::HashMap;
99
use std::fmt;
1010

1111
#[derive(Debug, Deserialize)]
12+
#[serde(deny_unknown_fields)]
1213
pub struct Rename {
1314
pub path: String,
1415
pub rename: String,
@@ -43,7 +44,7 @@ impl<'de, const REPLACEMENT_ALLOWED: bool> Deserialize<'de> for DisallowedPath<R
4344
// `DisallowedPathEnum` is an implementation detail to enable the `Deserialize` implementation just
4445
// above. `DisallowedPathEnum` is not meant to be used outside of this file.
4546
#[derive(Debug, Deserialize, Serialize)]
46-
#[serde(untagged)]
47+
#[serde(untagged, deny_unknown_fields)]
4748
enum DisallowedPathEnum {
4849
Simple(String),
4950
WithReason {

0 commit comments

Comments
 (0)