aboutsummaryrefslogtreecommitdiffstats
path: root/stanza/src/stanza_error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stanza/src/stanza_error.rs')
-rw-r--r--stanza/src/stanza_error.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/stanza/src/stanza_error.rs b/stanza/src/stanza_error.rs
index 664a168..8fb862f 100644
--- a/stanza/src/stanza_error.rs
+++ b/stanza/src/stanza_error.rs
@@ -1,9 +1,6 @@
// https://datatracker.ietf.org/doc/html/rfc6120#appendix-A.8
-use peanuts::{
- element::{FromElement, IntoElement},
- Element, XML_NS,
-};
+use peanuts::{Element, FromElement, IntoElement, XML_NS};
use thiserror::Error;
#[cfg(feature = "xep_0060")]
@@ -64,7 +61,7 @@ pub enum Error {
}
impl FromElement for Error {
- fn from_element(mut element: peanuts::Element) -> peanuts::element::DeserializeResult<Self> {
+ fn from_element(mut element: peanuts::Element) -> peanuts::DeserializeResult<Self> {
let error;
match element.identify() {
(Some(XMLNS), "bad-request") => error = Error::BadRequest,
@@ -101,7 +98,7 @@ impl FromElement for Error {
}
impl IntoElement for Error {
- fn builder(&self) -> peanuts::element::ElementBuilder {
+ fn builder(&self) -> peanuts::ElementBuilder {
match self {
Error::BadRequest => Element::builder("bad-request", Some(XMLNS)),
Error::Conflict => Element::builder("conflict", Some(XMLNS)),
@@ -142,7 +139,7 @@ pub struct Text {
}
impl FromElement for Text {
- fn from_element(mut element: peanuts::Element) -> peanuts::element::DeserializeResult<Self> {
+ fn from_element(mut element: peanuts::Element) -> peanuts::DeserializeResult<Self> {
element.check_name("text")?;
element.check_name(XMLNS)?;
@@ -154,7 +151,7 @@ impl FromElement for Text {
}
impl IntoElement for Text {
- fn builder(&self) -> peanuts::element::ElementBuilder {
+ fn builder(&self) -> peanuts::ElementBuilder {
Element::builder("text", Some(XMLNS))
.push_attribute_opt_namespaced(XML_NS, "lang", self.lang.clone())
.push_text_opt(self.text.clone())