From 7cd4a49011fc3f0837eb0de50e7c5c7e5fe45026 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 29 Apr 2017 06:06:41 +0100 Subject: [PATCH] error: Add JidParseError. --- src/error.rs | 8 ++++++++ 1 file changed, 8 insertions(+) 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) + } +}