diff options
Diffstat (limited to 'stanza/src/xep_0203.rs')
-rw-r--r-- | stanza/src/xep_0203.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/stanza/src/xep_0203.rs b/stanza/src/xep_0203.rs index b8f9239..41ff196 100644 --- a/stanza/src/xep_0203.rs +++ b/stanza/src/xep_0203.rs @@ -1,9 +1,6 @@ use chrono::{DateTime, Utc}; use jid::JID; -use peanuts::{ - element::{FromElement, IntoElement}, - Element, -}; +use peanuts::{Element, FromElement, IntoElement}; pub const XMLNS: &str = "urn:xmpp:delay"; @@ -14,7 +11,7 @@ pub struct Delay { } impl FromElement for Delay { - fn from_element(mut element: Element) -> peanuts::element::DeserializeResult<Self> { + fn from_element(mut element: Element) -> peanuts::DeserializeResult<Self> { element.check_name("delay")?; element.check_namespace(XMLNS)?; @@ -26,7 +23,7 @@ impl FromElement for Delay { } impl IntoElement for Delay { - fn builder(&self) -> peanuts::element::ElementBuilder { + fn builder(&self) -> peanuts::ElementBuilder { Element::builder("delay", Some(XMLNS)) .push_attribute_opt("from", self.from.clone()) .push_attribute("stamp", self.stamp.format("%C%y-%m-%dT%H:%M:%S%.3f%:z")) |