diff --git a/Cargo.toml b/Cargo.toml index b70538110dc033d592a6b06bab35c010d605c298..b4a760b270f509f5a6344b3f0246c9ba04e1898c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ categories = ["parsing", "network-programming"] license = "MPL-2.0" [dependencies] -minidom = "0.4.3" +minidom = "0.4.4" jid = "0.2.0" base64 = "0.6.0" digest = "0.6.0" diff --git a/src/data_forms.rs b/src/data_forms.rs index bccdca0928e1964efa2f932ec1983709dd9fda82..eb751e0ba27632389faa0f286dfff851eea24c44 100644 --- a/src/data_forms.rs +++ b/src/data_forms.rs @@ -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 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 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 for Element { } } -impl IntoElements for DataForm { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/src/disco.rs b/src/disco.rs index aee3de6ae612cacb8e40e35ef6bb66c0f8baab23..167440edabd21a8afebbed84ec33af01cc6efce1 100644 --- a/src/disco.rs +++ b/src/disco.rs @@ -6,7 +6,7 @@ use try_from::TryFrom; -use minidom::{Element, IntoElements, ElementEmitter}; +use minidom::Element; use error::Error; use ns; @@ -62,12 +62,6 @@ impl From for Element { } } -impl IntoElements for Feature { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[derive(Debug, Clone)] pub struct Identity { pub category: String, // TODO: use an enum here. @@ -88,12 +82,6 @@ impl From for Element { } } -impl IntoElements for Identity { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[derive(Debug, Clone)] pub struct DiscoInfoResult { pub node: Option, diff --git a/src/ibr.rs b/src/ibr.rs index 59dc15d81e1c689fe2494746214b1b67fa55394c..c51153e65f2f72bfd503d8ff3bbed07cc501fc3d 100644 --- a/src/ibr.rs +++ b/src/ibr.rs @@ -7,7 +7,7 @@ use std::collections::HashMap; use try_from::TryFrom; -use minidom::{Element, IntoElements, ElementEmitter}; +use minidom::Element; use error::Error; @@ -78,12 +78,6 @@ impl From for Element { } } -impl IntoElements for Query { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/src/jingle.rs b/src/jingle.rs index 1d0c07f15434050eb1dfdc39c4a1ca3afaf57aac..62fb4b5afdc4b6c387bac2f434b998dcb5e96c10 100644 --- a/src/jingle.rs +++ b/src/jingle.rs @@ -7,7 +7,7 @@ use try_from::TryFrom; use std::str::FromStr; -use minidom::{Element, IntoElements, IntoAttributeValue, ElementEmitter}; +use minidom::{Element, IntoAttributeValue}; use jid::Jid; use error::Error; @@ -110,12 +110,6 @@ impl From for Element { } } -impl IntoElements for Content { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[derive(Debug, Clone, PartialEq)] pub enum Reason { AlternativeSession, //(String), @@ -240,12 +234,6 @@ impl From for Element { } } -impl IntoElements for ReasonElement { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - generate_id!(SessionId); #[derive(Debug, Clone)] diff --git a/src/media_element.rs b/src/media_element.rs index aa15efb5637e8d440f40a7de5f1d58d6fedd5fd1..b2e5857d449630ab36956cd4b2bcc46f736b558f 100644 --- a/src/media_element.rs +++ b/src/media_element.rs @@ -6,7 +6,7 @@ use try_from::TryFrom; -use minidom::{Element, IntoElements, ElementEmitter}; +use minidom::Element; use error::Error; @@ -28,12 +28,6 @@ impl From for Element { } } -impl IntoElements for URI { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[derive(Debug, Clone)] pub struct MediaElement { pub width: Option, @@ -81,12 +75,6 @@ impl From for Element { } } -impl IntoElements for MediaElement { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/src/muc/user.rs b/src/muc/user.rs index 48da79666889ebb5357f15ba3d50c0fa0ef5e03e..afc9e72187705a9117b436ad45c252587c47e505 100644 --- a/src/muc/user.rs +++ b/src/muc/user.rs @@ -8,7 +8,7 @@ use try_from::{TryFrom, TryInto}; use std::str::FromStr; -use minidom::{Element, IntoElements, IntoAttributeValue, ElementEmitter}; +use minidom::{Element, IntoAttributeValue}; use jid::Jid; @@ -142,12 +142,6 @@ impl From for Element { } } -impl IntoElements for Status { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - /// Optional element used in elements inside presence stanzas of type /// "unavailable" that are sent to users who are kick or banned, as well as within IQs for tracking /// purposes. -- CHANGELOG 0.17 (2002-10-23) @@ -198,12 +192,6 @@ impl From for Element { } } -impl IntoElements for Actor { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[derive(Debug, Clone, PartialEq)] pub struct Continue { thread: Option, @@ -237,12 +225,6 @@ impl From for Element { } } -impl IntoElements for Continue { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[derive(Debug, Clone, PartialEq)] pub struct Reason(String); @@ -272,12 +254,6 @@ impl From for Element { } } -impl IntoElements for Reason { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - generate_attribute!(Affiliation, "affiliation", { Owner => "owner", Admin => "admin", diff --git a/src/pubsub/event.rs b/src/pubsub/event.rs index 04519e96e462cc60ff8a778f707b7132cd1eb0d7..a6fa4550a6775751a465a13a855e82235770508f 100644 --- a/src/pubsub/event.rs +++ b/src/pubsub/event.rs @@ -7,7 +7,7 @@ use try_from::TryFrom; use std::str::FromStr; -use minidom::{Element, IntoElements, IntoAttributeValue, ElementEmitter}; +use minidom::{Element, IntoAttributeValue}; use jid::Jid; use chrono::{DateTime, FixedOffset}; @@ -37,12 +37,6 @@ impl From for Element { } } -impl IntoElements for Item { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - generate_attribute!(Subscription, "subscription", { None => "none", Pending => "pending", diff --git a/src/roster.rs b/src/roster.rs index a1ed2dc541e78ea639e0a24b299ec6459f969ee0..1a4cc50e8df99c8b3ba89478364ef6339eaa4af7 100644 --- a/src/roster.rs +++ b/src/roster.rs @@ -7,7 +7,7 @@ use try_from::TryFrom; use std::str::FromStr; -use minidom::{Element, IntoElements, IntoAttributeValue, ElementEmitter}; +use minidom::{Element, IntoAttributeValue}; use jid::Jid; use error::Error; @@ -70,12 +70,6 @@ impl From for Element { } } -impl IntoElements for Item { - fn into_elements(self, emitter: &mut ElementEmitter) { - emitter.append_child(self.into()); - } -} - #[derive(Debug, Clone)] pub struct Roster { pub ver: Option,