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};
Emmanuel Gil Peyrot created
src/data_forms.rs | 1 -
src/ibb.rs | 2 --
src/jingle_ft.rs | 2 +-
src/jingle_ibb.rs | 2 --
src/jingle_s5b.rs | 2 +-
src/macros.rs | 8 ++++----
src/mam.rs | 2 +-
src/message.rs | 2 +-
src/muc/user.rs | 1 -
src/pubsub/event.rs | 1 -
src/roster.rs | 3 +--
src/sasl.rs | 2 --
src/stanza_error.rs | 1 -
13 files changed, 9 insertions(+), 20 deletions(-)
@@ -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};
@@ -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;
@@ -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};
@@ -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;
@@ -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<Transport> for Element {
#[cfg(test)]
mod tests {
use super::*;
+ use std::str::FromStr;
use compare_elements::NamespaceAwareCompare;
#[test]
@@ -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.
@@ -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<Prefs> for Element {
#[cfg(test)]
mod tests {
use super::*;
+ use std::str::FromStr;
#[test]
fn test_query() {
@@ -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<Message> for Element {
#[cfg(test)]
mod tests {
use super::*;
+ use std::str::FromStr;
use compare_elements::NamespaceAwareCompare;
#[test]
@@ -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};
@@ -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;
@@ -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]
@@ -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;
@@ -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};