Discard ignored nodes after unnamed field element

This commit is contained in:
Dirkjan Ochtman 2022-11-26 15:03:22 -08:00
parent ff8c0c2886
commit 0dca1bbe14
1 changed files with 1 additions and 0 deletions

View File

@ -459,6 +459,7 @@ fn unnamed_field(
let mut nested = deserializer.nested(data); let mut nested = deserializer.nested(data);
let mut value: Option<#no_lifetime_type> = None; let mut value: Option<#no_lifetime_type> = None;
<#no_lifetime_type>::deserialize(&mut nested, &mut value)?; <#no_lifetime_type>::deserialize(&mut nested, &mut value)?;
nested.ignore()?;
value value
} }
Some(Ok(node)) => return Err(Error::UnexpectedNode(format!("{:?}", node))), Some(Ok(node)) => return Err(Error::UnexpectedNode(format!("{:?}", node))),