From 0dca1bbe148cdbdb0d94a91245d1c177ccc45c4e Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Sat, 26 Nov 2022 15:03:22 -0800 Subject: [PATCH] Discard ignored nodes after unnamed field element --- instant-xml-macros/src/de.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/instant-xml-macros/src/de.rs b/instant-xml-macros/src/de.rs index 9c6a28c..d0449ce 100644 --- a/instant-xml-macros/src/de.rs +++ b/instant-xml-macros/src/de.rs @@ -459,6 +459,7 @@ fn unnamed_field( let mut nested = deserializer.nested(data); let mut value: Option<#no_lifetime_type> = None; <#no_lifetime_type>::deserialize(&mut nested, &mut value)?; + nested.ignore()?; value } Some(Ok(node)) => return Err(Error::UnexpectedNode(format!("{:?}", node))),