diff options
Diffstat (limited to 'stanza/src/xep_0060/errors.rs')
-rw-r--r-- | stanza/src/xep_0060/errors.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/stanza/src/xep_0060/errors.rs b/stanza/src/xep_0060/errors.rs index e6817ac..6c6c530 100644 --- a/stanza/src/xep_0060/errors.rs +++ b/stanza/src/xep_0060/errors.rs @@ -1,9 +1,6 @@ use std::{fmt::Display, str::FromStr}; -use peanuts::{ - element::{FromElement, IntoElement}, - DeserializeError, Element, -}; +use peanuts::{DeserializeError, Element, FromElement, IntoElement}; use thiserror::Error; use crate::{client::error::ErrorType, stanza_error::Error as StanzaError}; @@ -121,7 +118,7 @@ impl Error { } impl FromElement for Error { - fn from_element(mut element: Element) -> peanuts::element::DeserializeResult<Self> { + fn from_element(mut element: Element) -> peanuts::DeserializeResult<Self> { match element.identify() { (Some(XMLNS), "closed-node") => Ok(Self::ClosedNode), (Some(XMLNS), "configuration-required") => Ok(Self::ConfigurationRequired), @@ -154,7 +151,7 @@ impl FromElement for Error { } impl IntoElement for Error { - fn builder(&self) -> peanuts::element::ElementBuilder { + fn builder(&self) -> peanuts::ElementBuilder { match self { Error::ClosedNode => Element::builder("closed-node", Some(XMLNS)), Error::ConfigurationRequired => Element::builder("configuration-required", Some(XMLNS)), |