From eca44f560206b5a8f54ae8681d931ac9920dd6a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 2 Apr 2020 23:11:58 +0200 Subject: [PATCH] jid: update for minidom changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- jid-rs/src/lib.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/jid-rs/src/lib.rs b/jid-rs/src/lib.rs index 9f8ecd3a..d992e646 100644 --- a/jid-rs/src/lib.rs +++ b/jid-rs/src/lib.rs @@ -773,19 +773,19 @@ mod tests { #[cfg(feature = "minidom")] #[test] fn minidom() { - let elem: minidom::Element = "".parse().unwrap(); + let elem: minidom::Element = "".parse().unwrap(); let to: Jid = elem.attr("from").unwrap().parse().unwrap(); assert_eq!(to, Jid::Full(FullJid::new("a", "b", "c"))); - let elem: minidom::Element = "".parse().unwrap(); + let elem: minidom::Element = "".parse().unwrap(); let to: Jid = elem.attr("from").unwrap().parse().unwrap(); assert_eq!(to, Jid::Bare(BareJid::new("a", "b"))); - let elem: minidom::Element = "".parse().unwrap(); + let elem: minidom::Element = "".parse().unwrap(); let to: FullJid = elem.attr("from").unwrap().parse().unwrap(); assert_eq!(to, FullJid::new("a", "b", "c")); - let elem: minidom::Element = "".parse().unwrap(); + let elem: minidom::Element = "".parse().unwrap(); let to: BareJid = elem.attr("from").unwrap().parse().unwrap(); assert_eq!(to, BareJid::new("a", "b")); } @@ -794,22 +794,19 @@ mod tests { #[test] fn minidom_into_attr() { let full = FullJid::new("a", "b", "c"); - let elem = minidom::Element::builder("message") - .ns("jabber:client") + let elem = minidom::Element::builder("message", "jabber:client") .attr("from", full.clone()) .build(); assert_eq!(elem.attr("from"), Some(String::from(full).as_ref())); let bare = BareJid::new("a", "b"); - let elem = minidom::Element::builder("message") - .ns("jabber:client") + let elem = minidom::Element::builder("message", "jabber:client") .attr("from", bare.clone()) .build(); assert_eq!(elem.attr("from"), Some(String::from(bare.clone()).as_ref())); let jid = Jid::Bare(bare.clone()); - let _elem = minidom::Element::builder("message") - .ns("jabber:client") + let _elem = minidom::Element::builder("message", "jabber:client") .attr("from", jid) .build(); assert_eq!(elem.attr("from"), Some(String::from(bare).as_ref()));