error: Remove unused imports.

Emmanuel Gil Peyrot created

Change summary

src/util/error.rs | 25 +++++++++----------------
1 file changed, 9 insertions(+), 16 deletions(-)

Detailed changes

src/util/error.rs 🔗

@@ -4,15 +4,8 @@
 // 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 base64;
-use chrono;
-use jid;
-use std::convert::From;
 use std::error::Error as StdError;
 use std::fmt;
-use std::net;
-use std::num;
-use std::string;
 
 /// Contains one of the potential errors triggered while parsing an
 /// [Element](../struct.Element.html) into a specialised struct.
@@ -29,14 +22,14 @@ pub enum Error {
     Base64Error(base64::DecodeError),
 
     /// Generated when text which should be an integer fails to parse.
-    ParseIntError(num::ParseIntError),
+    ParseIntError(std::num::ParseIntError),
 
     /// Generated when text which should be a string fails to parse.
-    ParseStringError(string::ParseError),
+    ParseStringError(std::string::ParseError),
 
     /// Generated when text which should be an IP address (IPv4 or IPv6) fails
     /// to parse.
-    ParseAddrError(net::AddrParseError),
+    ParseAddrError(std::net::AddrParseError),
 
     /// Generated when text which should be a [JID](../../jid/struct.Jid.html)
     /// fails to parse.
@@ -81,20 +74,20 @@ impl From<base64::DecodeError> for Error {
     }
 }
 
-impl From<num::ParseIntError> for Error {
-    fn from(err: num::ParseIntError) -> Error {
+impl From<std::num::ParseIntError> for Error {
+    fn from(err: std::num::ParseIntError) -> Error {
         Error::ParseIntError(err)
     }
 }
 
-impl From<string::ParseError> for Error {
-    fn from(err: string::ParseError) -> Error {
+impl From<std::string::ParseError> for Error {
+    fn from(err: std::string::ParseError) -> Error {
         Error::ParseStringError(err)
     }
 }
 
-impl From<net::AddrParseError> for Error {
-    fn from(err: net::AddrParseError) -> Error {
+impl From<std::net::AddrParseError> for Error {
+    fn from(err: std::net::AddrParseError) -> Error {
         Error::ParseAddrError(err)
     }
 }