diff --git a/src/error.rs b/src/error.rs index 07b01c1..1f001ca 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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 for Error { @@ -37,3 +39,9 @@ impl From for Error { Error::ParseIntError(err) } } + +impl From for Error { + fn from(err: jid::JidParseError) -> Error { + Error::JidParseError(err) + } +}