mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
error: Remove unused io::Error from Error.
This commit is contained in:
parent
f568270ac5
commit
93150bcd2a
1 changed files with 0 additions and 9 deletions
|
@ -5,7 +5,6 @@
|
|||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
use std::convert::From;
|
||||
use std::io;
|
||||
use std::num;
|
||||
use std::string;
|
||||
use std::fmt;
|
||||
|
@ -19,7 +18,6 @@ use chrono;
|
|||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
ParseError(&'static str),
|
||||
IoError(io::Error),
|
||||
XMLError(minidom::Error),
|
||||
Base64Error(base64::DecodeError),
|
||||
ParseIntError(num::ParseIntError),
|
||||
|
@ -33,7 +31,6 @@ impl fmt::Display for Error {
|
|||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
Error::ParseError(s) => write!(fmt, "{}", s),
|
||||
Error::IoError(ref e) => write!(fmt, "{}", e),
|
||||
Error::XMLError(ref e) => write!(fmt, "{}", e),
|
||||
Error::Base64Error(ref e) => write!(fmt, "{}", e),
|
||||
Error::ParseIntError(ref e) => write!(fmt, "{}", e),
|
||||
|
@ -45,12 +42,6 @@ impl fmt::Display for Error {
|
|||
}
|
||||
}
|
||||
|
||||
impl From<io::Error> for Error {
|
||||
fn from(err: io::Error) -> Error {
|
||||
Error::IoError(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<minidom::Error> for Error {
|
||||
fn from(err: minidom::Error) -> Error {
|
||||
Error::XMLError(err)
|
||||
|
|
Loading…
Reference in a new issue