error: Add JidParseError.

This commit is contained in:
Emmanuel Gil Peyrot 2017-04-29 06:06:41 +01:00
parent 72a6eee2fd
commit 7cd4a49011

View file

@ -4,6 +4,7 @@ use std::num;
use base64;
use minidom;
use jid;
#[derive(Debug)]
pub enum Error {
@ -12,6 +13,7 @@ pub enum Error {
XMLError(minidom::Error),
Base64Error(base64::DecodeError),
ParseIntError(num::ParseIntError),
JidParseError(jid::JidParseError),
}
impl From<io::Error> for Error {
@ -37,3 +39,9 @@ impl From<num::ParseIntError> for Error {
Error::ParseIntError(err)
}
}
impl From<jid::JidParseError> for Error {
fn from(err: jid::JidParseError) -> Error {
Error::JidParseError(err)
}
}