Detailed changes
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use error::Error;
@@ -17,6 +15,7 @@ generate_empty_element!(Attention, "attention", ns::ATTENTION);
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -6,8 +6,6 @@
#![deny(missing_docs)]
-use try_from::TryFrom;
-
use minidom::Element;
use error::Error;
@@ -38,6 +36,7 @@ generate_element_enum!(
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use error::Error;
use helpers::PlainText;
@@ -38,6 +36,7 @@ impl Handshake {
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use date::DateTime;
@@ -26,6 +24,7 @@ generate_element_with_text!(Delay, "delay", ns::DELAY,
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
use std::str::FromStr;
#[test]
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use error::Error;
@@ -26,6 +24,7 @@ ExplicitMessageEncryption, "encryption", ns::EME, [
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -4,7 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
use std::str::FromStr;
use minidom::{Element, IntoAttributeValue};
@@ -93,6 +92,7 @@ impl Hash {
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -4,7 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
use std::str::FromStr;
use minidom::{Element, IntoAttributeValue};
@@ -40,6 +39,7 @@ generate_element_with_only_attributes!(Close, "close", ns::IBB, [
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
use std::error::Error as StdError;
#[test]
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use date::DateTime;
@@ -20,6 +18,7 @@ generate_element_with_only_attributes!(Idle, "idle", ns::IDLE, [
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
use std::str::FromStr;
use std::error::Error as StdError;
@@ -4,7 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
use std::str::FromStr;
use minidom::{Element, IntoAttributeValue};
@@ -26,6 +25,7 @@ generate_element_with_only_attributes!(Transport, "transport", ns::JINGLE_IBB, [
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
use std::error::Error as StdError;
#[test]
@@ -116,7 +116,7 @@ macro_rules! generate_element_enum {
$enum
),+
}
- impl TryFrom<Element> for $elem {
+ impl ::try_from::TryFrom<Element> for $elem {
type Err = Error;
fn try_from(elem: Element) -> Result<$elem, Error> {
check_ns_only!(elem, $name, $ns);
@@ -152,7 +152,7 @@ macro_rules! generate_attribute_enum {
$enum
),+
}
- impl TryFrom<Element> for $elem {
+ impl ::try_from::TryFrom<Element> for $elem {
type Err = Error;
fn try_from(elem: Element) -> Result<$elem, Error> {
check_ns_only!(elem, $name, $ns);
@@ -231,7 +231,7 @@ macro_rules! generate_empty_element {
#[derive(Debug, Clone)]
pub struct $elem;
- impl TryFrom<Element> for $elem {
+ impl ::try_from::TryFrom<Element> for $elem {
type Err = Error;
fn try_from(elem: Element) -> Result<$elem, Error> {
@@ -266,7 +266,7 @@ macro_rules! generate_element_with_only_attributes {
)*
}
- impl TryFrom<Element> for $elem {
+ impl ::try_from::TryFrom<Element> for $elem {
type Err = Error;
fn try_from(elem: Element) -> Result<$elem, Error> {
@@ -324,7 +324,7 @@ macro_rules! generate_elem_id {
Ok($elem(String::from(s)))
}
}
- impl TryFrom<Element> for $elem {
+ impl ::try_from::TryFrom<Element> for $elem {
type Err = Error;
fn try_from(elem: Element) -> Result<$elem, Error> {
check_self!(elem, $name, $ns);
@@ -360,7 +360,7 @@ macro_rules! generate_element_with_text {
pub $text_ident: $text_type,
}
- impl TryFrom<Element> for $elem {
+ impl ::try_from::TryFrom<Element> for $elem {
type Err = Error;
fn try_from(elem: Element) -> Result<$elem, Error> {
@@ -405,7 +405,7 @@ macro_rules! generate_element_with_children {
)*
}
- impl TryFrom<Element> for $elem {
+ impl ::try_from::TryFrom<Element> for $elem {
type Err = Error;
fn try_from(elem: Element) -> Result<$elem, Error> {
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use error::Error;
@@ -33,6 +31,7 @@ generate_element_with_children!(MediaElement, "media", ns::MEDIA_ELEMENT,
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
use data_forms::DataForm;
use std::error::Error as StdError;
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use error::Error;
@@ -19,6 +17,7 @@ generate_element_with_only_attributes!(Replace, "replace", ns::MESSAGE_CORRECT,
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -6,8 +6,6 @@
#![deny(missing_docs)]
-use try_from::TryFrom;
-
use minidom::Element;
use error::Error;
@@ -274,6 +272,7 @@ generate_element_enum!(
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -5,8 +5,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use error::Error;
@@ -18,6 +16,7 @@ generate_empty_element!(Ping, "ping", ns::PING);
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use error::Error;
@@ -21,6 +19,7 @@ generate_element_with_only_attributes!(Received, "received", ns::RECEIPTS, [
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -4,7 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
use std::str::FromStr;
use minidom::{Element, IntoAttributeValue};
@@ -64,6 +63,7 @@ generate_element_with_children!(
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
use compare_elements::NamespaceAwareCompare;
#[test]
@@ -4,7 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
use std::str::FromStr;
use minidom::{Element, IntoAttributeValue};
@@ -42,6 +41,7 @@ generate_element_with_text!(Success, "success", ns::SASL,
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use jid::Jid;
@@ -25,6 +23,7 @@ generate_element_with_only_attributes!(OriginId, "origin-id", ns::SID, [
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
use std::str::FromStr;
#[test]
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use jid::Jid;
use error::Error;
@@ -56,6 +54,7 @@ impl Stream {
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {
@@ -4,8 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-use try_from::TryFrom;
-
use minidom::Element;
use jid::Jid;
use error::Error;
@@ -56,6 +54,7 @@ impl Open {
#[cfg(test)]
mod tests {
use super::*;
+ use try_from::TryFrom;
#[test]
fn test_simple() {