mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-21 03:06:22 +00:00
deserializing from maps should ignore unknown values
This commit is contained in:
1 parent
d98aaaa54d
commit
6cd71e3e1d
1 file changed
+5
-1
@@ -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