Upgrade to minidom 0.4.4 to avoid having to redefine IntoElements for each Into<Element>.
This commit is contained in:
parent
21cee25b27
commit
3b6733f38b
9 changed files with 9 additions and 105 deletions
|
|
@ -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::*;
|
||||
|
|
|
|||
Loading…
Reference in a new issue