mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
error: Add JidParseError.
This commit is contained in:
parent
72a6eee2fd
commit
7cd4a49011
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue