diff --git a/src/data_forms.rs b/src/data_forms.rs index 9b173b8a..1e297409 100644 --- a/src/data_forms.rs +++ b/src/data_forms.rs @@ -5,7 +5,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use try_from::TryFrom; -use std::str::FromStr; use minidom::{Element, IntoAttributeValue}; diff --git a/src/ibb.rs b/src/ibb.rs index 2c0497cc..d5188177 100644 --- a/src/ibb.rs +++ b/src/ibb.rs @@ -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 std::str::FromStr; - use minidom::{Element, IntoAttributeValue}; use error::Error; diff --git a/src/jingle_ft.rs b/src/jingle_ft.rs index c78e1d45..788ff22f 100644 --- a/src/jingle_ft.rs +++ b/src/jingle_ft.rs @@ -5,9 +5,9 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use try_from::TryFrom; +use std::str::FromStr; use std::collections::BTreeMap; -use std::str::FromStr; use hashes::Hash; use jingle::{Creator, ContentId}; diff --git a/src/jingle_ibb.rs b/src/jingle_ibb.rs index dca42668..2cf0fb44 100644 --- a/src/jingle_ibb.rs +++ b/src/jingle_ibb.rs @@ -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 std::str::FromStr; - use minidom::{Element, IntoAttributeValue}; use error::Error; diff --git a/src/jingle_s5b.rs b/src/jingle_s5b.rs index 558eb560..7ef0bbd2 100644 --- a/src/jingle_s5b.rs +++ b/src/jingle_s5b.rs @@ -5,7 +5,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use try_from::TryFrom; -use std::str::FromStr; use std::net::IpAddr; use minidom::{Element, IntoAttributeValue}; @@ -206,6 +205,7 @@ impl From for Element { #[cfg(test)] mod tests { use super::*; + use std::str::FromStr; use compare_elements::NamespaceAwareCompare; #[test] diff --git a/src/macros.rs b/src/macros.rs index 5ea49210..0a056f8d 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -51,7 +51,7 @@ macro_rules! generate_attribute { $a ),+ } - impl FromStr for $elem { + impl ::std::str::FromStr for $elem { type Err = Error; fn from_str(s: &str) -> Result<$elem, Error> { Ok(match s { @@ -77,7 +77,7 @@ macro_rules! generate_attribute { $a ),+ } - impl FromStr for $elem { + impl ::std::str::FromStr for $elem { type Err = Error; fn from_str(s: &str) -> Result<$elem, Error> { Ok(match s { @@ -298,7 +298,7 @@ macro_rules! generate_id { ($elem:ident) => ( #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct $elem(pub String); - impl FromStr for $elem { + impl ::std::str::FromStr for $elem { type Err = Error; fn from_str(s: &str) -> Result<$elem, Error> { // TODO: add a way to parse that differently when needed. @@ -317,7 +317,7 @@ macro_rules! generate_elem_id { ($elem:ident, $name:tt, $ns:expr) => ( #[derive(Debug, Clone, PartialEq, Eq, Hash)] pub struct $elem(pub String); - impl FromStr for $elem { + impl ::std::str::FromStr for $elem { type Err = Error; fn from_str(s: &str) -> Result<$elem, Error> { // TODO: add a way to parse that differently when needed. diff --git a/src/mam.rs b/src/mam.rs index 82158a40..115daf65 100644 --- a/src/mam.rs +++ b/src/mam.rs @@ -5,7 +5,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use try_from::TryFrom; -use std::str::FromStr; use minidom::{Element, IntoAttributeValue}; use jid::Jid; @@ -220,6 +219,7 @@ impl From for Element { #[cfg(test)] mod tests { use super::*; + use std::str::FromStr; #[test] fn test_query() { diff --git a/src/message.rs b/src/message.rs index c4c4a17f..36d09a7c 100644 --- a/src/message.rs +++ b/src/message.rs @@ -5,7 +5,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use try_from::TryFrom; -use std::str::FromStr; use std::collections::BTreeMap; use minidom::{Element, IntoAttributeValue}; @@ -278,6 +277,7 @@ impl From for Element { #[cfg(test)] mod tests { use super::*; + use std::str::FromStr; use compare_elements::NamespaceAwareCompare; #[test] diff --git a/src/muc/user.rs b/src/muc/user.rs index a6614a63..1c3d2cc9 100644 --- a/src/muc/user.rs +++ b/src/muc/user.rs @@ -6,7 +6,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use try_from::{TryFrom, TryInto}; -use std::str::FromStr; use minidom::{Element, IntoAttributeValue}; diff --git a/src/pubsub/event.rs b/src/pubsub/event.rs index cbeb6ef7..1d478cad 100644 --- a/src/pubsub/event.rs +++ b/src/pubsub/event.rs @@ -5,7 +5,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use try_from::TryFrom; -use std::str::FromStr; use minidom::{Element, IntoAttributeValue}; use jid::Jid; diff --git a/src/roster.rs b/src/roster.rs index 358e4a46..54847e02 100644 --- a/src/roster.rs +++ b/src/roster.rs @@ -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 std::str::FromStr; - use minidom::{Element, IntoAttributeValue}; use jid::Jid; @@ -64,6 +62,7 @@ generate_element_with_children!( mod tests { use super::*; use try_from::TryFrom; + use std::str::FromStr; use compare_elements::NamespaceAwareCompare; #[test] diff --git a/src/sasl.rs b/src/sasl.rs index cb192804..c53eba2f 100644 --- a/src/sasl.rs +++ b/src/sasl.rs @@ -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 std::str::FromStr; - use minidom::{Element, IntoAttributeValue}; use error::Error; diff --git a/src/stanza_error.rs b/src/stanza_error.rs index 4977739d..79386252 100644 --- a/src/stanza_error.rs +++ b/src/stanza_error.rs @@ -5,7 +5,6 @@ // file, You can obtain one at http://mozilla.org/MPL/2.0/. use try_from::TryFrom; -use std::str::FromStr; use std::collections::BTreeMap; use minidom::{Element, IntoAttributeValue};