Skip to content

Commit d64d533

Browse files
committed
Address derive_deserialize_allowing_unknown errors
1 parent ff32bcb commit d64d533

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_config/src/types.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ use std::collections::HashMap;
1111
use std::fmt;
1212

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

0 commit comments

Comments
 (0)