From 5334cd4ed69d12e4265b8b97ae9e7ed02f78a9ff Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Sat, 5 Aug 2023 20:14:09 +0100 Subject: WIP: refactor Element type - namespace work --- src/error.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/error.rs') diff --git a/src/error.rs b/src/error.rs index 8aa98ae..9278f1b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -5,7 +5,7 @@ use rsasl::mechname::MechanismNameError; use crate::{ jid::ParseError, - stanza::{self, ElementError}, + stanza::{self, ElementError, ElementParseError}, }; #[derive(Debug)] @@ -22,6 +22,7 @@ pub enum JabberError { NoType, IDMismatch, BindError, + ElementParse(ElementParseError), ParseError, UnexpectedEnd, UnexpectedElement, @@ -87,3 +88,9 @@ impl From for JabberError { Self::JID(e) } } + +impl From for JabberError { + fn from(e: ElementParseError) -> Self { + Self::ElementParse(e) + } +} -- cgit