Remove unnecessary workaround

This commit is contained in:
Dirkjan Ochtman 2022-11-26 14:58:50 -08:00
parent 72b8a21b4d
commit ff8c0c2886
2 changed files with 1 additions and 15 deletions

View File

@ -466,9 +466,8 @@ fn unnamed_field(
None => return Err(Error::MissingValue(&<#no_lifetime_type as FromXml>::KIND)), None => return Err(Error::MissingValue(&<#no_lifetime_type as FromXml>::KIND)),
} }
Kind::Scalar => { Kind::Scalar => {
let mut nested = deserializer.for_scalar();
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(deserializer, &mut value)?;
value value
} }
}; };

View File

@ -59,19 +59,6 @@ impl<'cx, 'xml> Deserializer<'cx, 'xml> {
} }
} }
pub fn for_scalar<'a>(&'a mut self) -> Deserializer<'a, 'xml>
where
'cx: 'a,
{
Deserializer {
local: self.local,
prefix: self.prefix,
level: self.level,
done: self.done,
context: self.context,
}
}
pub fn for_node<'a>(&'a mut self, node: Node<'xml>) -> Deserializer<'a, 'xml> pub fn for_node<'a>(&'a mut self, node: Node<'xml>) -> Deserializer<'a, 'xml>
where where
'cx: 'a, 'cx: 'a,