Upgrade to minidom 0.4.4 to avoid having to redefine IntoElements for each Into<Element>.

This commit is contained in:
Emmanuel Gil Peyrot 2017-07-21 01:20:29 +01:00
commit 3b6733f38b
9 changed files with 9 additions and 105 deletions

View file

@ -7,7 +7,7 @@
use try_from::TryFrom;
use std::str::FromStr;
use minidom::{Element, IntoElements, IntoAttributeValue, ElementEmitter};
use minidom::{Element, IntoAttributeValue};
use error::Error;
use ns;
@ -46,12 +46,6 @@ impl From<Option_> for Element {
}
}
impl IntoElements for Option_ {
fn into_elements(self, emitter: &mut ElementEmitter) {
emitter.append_child(self.into());
}
}
#[derive(Debug, Clone)]
pub struct Field {
pub var: String,
@ -80,12 +74,6 @@ impl From<Field> for Element {
}
}
impl IntoElements for Field {
fn into_elements(self, emitter: &mut ElementEmitter) {
emitter.append_child(self.into());
}
}
generate_attribute!(DataFormType, "type", {
Cancel => "cancel",
Form => "form",
@ -236,12 +224,6 @@ impl From<DataForm> for Element {
}
}
impl IntoElements for DataForm {
fn into_elements(self, emitter: &mut ElementEmitter) {
emitter.append_child(self.into());
}
}
#[cfg(test)]
mod tests {
use super::*;