error: Remove unused imports.

This commit is contained in:
Emmanuel Gil Peyrot 2019-09-07 16:18:25 +02:00
parent f83e9fd928
commit 0328ec446a

View file

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