Add FromXml impl for ()

This commit is contained in:
Dirkjan Ochtman 2022-11-29 09:31:42 +01:00
parent 12402fb381
commit 0ea0eca53f
1 changed files with 12 additions and 0 deletions

View File

@ -522,3 +522,15 @@ impl<'xml> FromXml<'xml> for DateTime<Utc> {
const KIND: Kind<'static> = Kind::Scalar; const KIND: Kind<'static> = Kind::Scalar;
} }
impl<'xml> FromXml<'xml> for () {
fn deserialize<'cx>(
_: &mut Deserializer<'cx, 'xml>,
into: &mut Option<Self>,
) -> Result<(), Error> {
*into = Some(());
Ok(())
}
const KIND: Kind<'static> = Kind::Scalar;
}