From f17e2e03502ab3dd279c6bec92597977ad84eddc Mon Sep 17 00:00:00 2001 From: gibbz00 Date: Fri, 18 Oct 2024 18:47:23 +0200 Subject: [PATCH] feat: impl ToXml for Box --- instant-xml/src/impls.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/instant-xml/src/impls.rs b/instant-xml/src/impls.rs index 7830ac3..0bad5ab 100644 --- a/instant-xml/src/impls.rs +++ b/instant-xml/src/impls.rs @@ -488,6 +488,16 @@ impl ToXml for Option { } } +impl ToXml for Box { + fn serialize( + &self, + field: Option>, + serializer: &mut Serializer, + ) -> Result<(), Error> { + self.as_ref().serialize(field, serializer) + } +} + fn encode(input: &str) -> Result, Error> { let mut result = String::with_capacity(input.len()); let mut last_end = 0;