Remove unnecessary workaround
This commit is contained in:
parent
72b8a21b4d
commit
ff8c0c2886
|
@ -466,9 +466,8 @@ fn unnamed_field(
|
|||
None => return Err(Error::MissingValue(&<#no_lifetime_type as FromXml>::KIND)),
|
||||
}
|
||||
Kind::Scalar => {
|
||||
let mut nested = deserializer.for_scalar();
|
||||
let mut value: Option<#no_lifetime_type> = None;
|
||||
<#no_lifetime_type>::deserialize(&mut nested, &mut value)?;
|
||||
<#no_lifetime_type>::deserialize(deserializer, &mut value)?;
|
||||
value
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
where
|
||||
'cx: 'a,
|
||||
|
|
Loading…
Reference in New Issue