diff --git a/src/data_forms.rs b/src/data_forms.rs index 9b173b8aee979c6cf3f2f9b64889e01ed4a3e1ef..1e297409075bd04de6ea47a6c982aab36999a1d6 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 2c0497cc7b32d6ec82729d403e18577575655ede..d51881776157e5e9d83ad0fb2440d05d9896db0d 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 c78e1d45bf4776c1af567e61256849dfeab92732..788ff22fa64ed1dbec4497379be9c0a15a1a09ab 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 dca426681a0852258fa6f559ca1ddc91e0fb9f2d..2cf0fb446d963c219971b5c1ea3be7b4e5380eec 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 558eb560e92e22cc0f9ab5ca17c25912faf42219..7ef0bbd20d3e8a5f44723a2a7386023ac305264c 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 5ea49210ed35ff48214f0e0b733e4a97fcec6015..0a056f8d110dc8b34d9689160b0f95f50f2e92a6 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 82158a40e01db7fc082cba3b8dbadc14f636fb5e..115daf65b76d238ff12e0f4ccb0f0b4710fbb270 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 c4c4a17fb23d5a82a5cb718e11db8341dfcc6bf6..36d09a7c4f6e7aba137529fde5dcad7328e988fe 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 a6614a63af1c4bd6ada54c41583394bc5102b109..1c3d2cc9bb2f9bda4badaca1072f8aa9890bdbaa 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 cbeb6ef759b519fd07b082a92f555b3b28838329..1d478cad7df1f76b8b736edc3eb76d37fa0b9a98 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 358e4a461c47e5336007cc645b3ee19b331e5cb9..54847e02679f2b7c54b2d22077c2f03010d7678a 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 cb192804f094380d2734ff88ae4bd0d96f10e00a..c53eba2f66a958668e2efe1e7f0c1c5fc771d69c 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 4977739d3238592180914f85939f616002844893..79386252e9d39593b45743c8980dcb2f6abcd5a9 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};