mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-23 08:18:03 +00:00
deserializing from maps should ignore unknown values
This commit is contained in:
@@ -465,7 +465,11 @@ fn deserialize_struct_from_map(
|
||||
|
||||
match key {
|
||||
$key_arms
|
||||
_ => { }
|
||||
_ => {
|
||||
// Ignore unknown fields.
|
||||
let _: ::serde::de::IgnoreTokens =
|
||||
try!(Deserializable::deserialize($deserializer));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user