diff --git a/src/se/content.rs b/src/se/content.rs index bd5b4562..7a1973bb 100644 --- a/src/se/content.rs +++ b/src/se/content.rs @@ -88,7 +88,7 @@ impl<'w, 'i, W: Write> ContentSerializer<'w, 'i, W> { level: self.level, indent: self.indent.borrow(), write_indent: self.write_indent, - expand_empty_elements: false, + expand_empty_elements: self.expand_empty_elements, } } diff --git a/src/se/element.rs b/src/se/element.rs index 4f076df5..73ce416f 100644 --- a/src/se/element.rs +++ b/src/se/element.rs @@ -397,7 +397,7 @@ impl<'w, 'k, W: Write> Struct<'w, 'k, W> { level: self.ser.ser.level, indent: self.ser.ser.indent.borrow(), write_indent: true, - expand_empty_elements: false, + expand_empty_elements: self.ser.ser.expand_empty_elements, }; if key == TEXT_KEY {