From 35be5a43239a12c754aa866d0e33954d011fa4b5 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 19 Jul 2017 01:00:17 +0200 Subject: [PATCH] Cargo, echo_bot: fix xmpp-parsers usage --- Cargo.toml | 2 +- examples/echo_bot.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 16b9d4e..cf7735a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ tokio-io = "*" bytes = "0.4.4" xml5ever = "*" tendril = "*" -minidom = "0.5" +minidom = "0.4.3" native-tls = "*" tokio-tls = "*" sasl = "*" diff --git a/examples/echo_bot.rs b/examples/echo_bot.rs index 528ac34..b3be75c 100644 --- a/examples/echo_bot.rs +++ b/examples/echo_bot.rs @@ -86,7 +86,7 @@ fn make_presence() -> Element { let mut presence = Presence::new(PresenceType::None); presence.show = PresenceShow::Chat; presence.statuses.insert(String::from("en"), String::from("Echoing messages.")); - Element::from(presence) + presence.into() } // Construct a chat @@ -94,5 +94,5 @@ fn make_reply(to: &str, body: String) -> Element { let jid = to.parse().unwrap(); let mut message = Message::new(Some(jid)); message.bodies.insert(String::new(), body); - Element::from(message) + message.into() }