From 0328ec446a7a67eb9e20559863d9352adc2cc015 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 7 Sep 2019 16:18:25 +0200 Subject: [PATCH] error: Remove unused imports. --- src/util/error.rs | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/util/error.rs b/src/util/error.rs index b103711a..33b2a699 100644 --- a/src/util/error.rs +++ b/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 for Error { } } -impl From for Error { - fn from(err: num::ParseIntError) -> Error { +impl From for Error { + fn from(err: std::num::ParseIntError) -> Error { Error::ParseIntError(err) } } -impl From for Error { - fn from(err: string::ParseError) -> Error { +impl From for Error { + fn from(err: std::string::ParseError) -> Error { Error::ParseStringError(err) } } -impl From for Error { - fn from(err: net::AddrParseError) -> Error { +impl From for Error { + fn from(err: std::net::AddrParseError) -> Error { Error::ParseAddrError(err) } }