error: Remove unused minidom::Error from Error.
This commit is contained in:
parent
93150bcd2a
commit
bdae556787
1 changed files with 0 additions and 9 deletions
|
@ -11,14 +11,12 @@ use std::fmt;
|
||||||
use std::net;
|
use std::net;
|
||||||
|
|
||||||
use base64;
|
use base64;
|
||||||
use minidom;
|
|
||||||
use jid;
|
use jid;
|
||||||
use chrono;
|
use chrono;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
ParseError(&'static str),
|
ParseError(&'static str),
|
||||||
XMLError(minidom::Error),
|
|
||||||
Base64Error(base64::DecodeError),
|
Base64Error(base64::DecodeError),
|
||||||
ParseIntError(num::ParseIntError),
|
ParseIntError(num::ParseIntError),
|
||||||
ParseStringError(string::ParseError),
|
ParseStringError(string::ParseError),
|
||||||
|
@ -31,7 +29,6 @@ impl fmt::Display for Error {
|
||||||
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
|
||||||
match *self {
|
match *self {
|
||||||
Error::ParseError(s) => write!(fmt, "{}", s),
|
Error::ParseError(s) => write!(fmt, "{}", s),
|
||||||
Error::XMLError(ref e) => write!(fmt, "{}", e),
|
|
||||||
Error::Base64Error(ref e) => write!(fmt, "{}", e),
|
Error::Base64Error(ref e) => write!(fmt, "{}", e),
|
||||||
Error::ParseIntError(ref e) => write!(fmt, "{}", e),
|
Error::ParseIntError(ref e) => write!(fmt, "{}", e),
|
||||||
Error::ParseStringError(ref e) => write!(fmt, "{}", e),
|
Error::ParseStringError(ref e) => write!(fmt, "{}", e),
|
||||||
|
@ -42,12 +39,6 @@ impl fmt::Display for Error {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<minidom::Error> for Error {
|
|
||||||
fn from(err: minidom::Error) -> Error {
|
|
||||||
Error::XMLError(err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl From<base64::DecodeError> for Error {
|
impl From<base64::DecodeError> for Error {
|
||||||
fn from(err: base64::DecodeError) -> Error {
|
fn from(err: base64::DecodeError) -> Error {
|
||||||
Error::Base64Error(err)
|
Error::Base64Error(err)
|
||||||
|
|
Loading…
Reference in a new issue