aboutsummaryrefslogtreecommitdiffstats
path: root/stanza/src/stream_error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'stanza/src/stream_error.rs')
-rw-r--r--stanza/src/stream_error.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/stanza/src/stream_error.rs b/stanza/src/stream_error.rs
index 03d48eb..19ad1ae 100644
--- a/stanza/src/stream_error.rs
+++ b/stanza/src/stream_error.rs
@@ -1,7 +1,4 @@
-use peanuts::{
- element::{FromElement, IntoElement},
- DeserializeError, Element, XML_NS,
-};
+use peanuts::{DeserializeError, Element, FromElement, IntoElement, XML_NS};
use thiserror::Error;
pub const XMLNS: &str = "urn:ietf:params:xml:ns:xmpp-streams";
@@ -61,7 +58,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-format") => error = Error::BadFormat,
@@ -99,7 +96,7 @@ impl FromElement for Error {
}
impl IntoElement for Error {
- fn builder(&self) -> peanuts::element::ElementBuilder {
+ fn builder(&self) -> peanuts::ElementBuilder {
match self {
Error::BadFormat => Element::builder("bad-format", Some(XMLNS)),
Error::BadNamespacePrefix => Element::builder("bad-namespace-prefix", Some(XMLNS)),
@@ -143,7 +140,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)?;
@@ -155,7 +152,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())