delay: Implement IntoElements.

This commit is contained in:
Emmanuel Gil Peyrot 2017-04-29 03:50:02 +01:00
parent 8b964df645
commit 4dc585f1c9

View file

@ -1,4 +1,5 @@
use minidom::Element; use minidom::{Element, IntoElements};
use minidom::convert::ElementEmitter;
use error::Error; use error::Error;
@ -40,6 +41,13 @@ pub fn serialise(delay: &Delay) -> Element {
.build() .build()
} }
impl IntoElements for Delay {
fn into_elements(self, emitter: &mut ElementEmitter) {
let elem = serialise(&self);
emitter.append_child(elem)
}
}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use minidom::Element; use minidom::Element;