Skip to content

Commit fd19113

Browse files
committed
Address derive_deserialize_allowing_unknown errors
1 parent e486ab1 commit fd19113

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
@@ -12,6 +12,7 @@ use std::collections::HashMap;
1212
use std::fmt;
1313

1414
#[derive(Debug, Deserialize)]
15+
#[serde(deny_unknown_fields)]
1516
pub struct Rename {
1617
pub path: String,
1718
pub rename: String,
@@ -59,7 +60,7 @@ impl<'de, const REPLACEMENT_ALLOWED: bool> Deserialize<'de> for DisallowedPath<R
5960
// `DisallowedPathEnum` is an implementation detail to enable the `Deserialize` implementation just
6061
// above. `DisallowedPathEnum` is not meant to be used outside of this file.
6162
#[derive(Debug, Deserialize, Serialize)]
62-
#[serde(untagged)]
63+
#[serde(untagged, deny_unknown_fields)]
6364
enum DisallowedPathEnum {
6465
Simple(String),
6566
WithReason {

0 commit comments

Comments
 (0)