From 7750aae5b54d8bf5dbe301c9e9f174a5cdb558a9 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 29 Apr 2017 06:57:20 +0100 Subject: [PATCH] presence, message, jingle_ft: Remove unneeded println!(). --- src/jingle_ft.rs | 1 - src/message.rs | 15 +++++---------- src/presence.rs | 6 ++---- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/src/jingle_ft.rs b/src/jingle_ft.rs index 4d5a86a6..71b671c8 100644 --- a/src/jingle_ft.rs +++ b/src/jingle_ft.rs @@ -173,7 +173,6 @@ pub fn serialise_file(file: &File) -> Element { let mut root = Element::builder("file") .ns(ns::JINGLE_FT) .build(); - println!("{:#?}", file); if let Some(ref date) = file.date { root.append_child(Element::builder("date") .ns(ns::JINGLE_FT) diff --git a/src/message.rs b/src/message.rs index 34dc49b5..a915b221 100644 --- a/src/message.rs +++ b/src/message.rs @@ -192,31 +192,27 @@ mod tests { #[test] fn test_serialise() { let elem: Element = "".parse().unwrap(); - let message = message::parse_message(&elem).unwrap(); - let message2 = message::Message { + let message = message::Message { from: None, to: None, id: None, type_: message::MessageType::Normal, payloads: vec!(), }; - let elem2 = message::serialise(&message2); + let elem2 = message::serialise(&message); assert_eq!(elem, elem2); - println!("{:#?}", message); } #[test] fn test_body() { let elem: Element = "Hello world!".parse().unwrap(); - let message = message::parse_message(&elem).unwrap(); - println!("{:#?}", message); + message::parse_message(&elem).unwrap(); } #[test] fn test_serialise_body() { let elem: Element = "Hello world!".parse().unwrap(); - let message = message::parse_message(&elem).unwrap(); - let message2 = message::Message { + let message = message::Message { from: None, to: Some(Jid::from_str("coucou@example.org").unwrap()), id: None, @@ -225,9 +221,8 @@ mod tests { message::MessagePayloadType::Parsed(message::MessagePayload::Body("Hello world!".to_owned())), ), }; - let elem2 = message::serialise(&message2); + let elem2 = message::serialise(&message); assert_eq!(elem, elem2); - println!("{:#?}", message); } #[test] diff --git a/src/presence.rs b/src/presence.rs index ea2da4a3..a144e371 100644 --- a/src/presence.rs +++ b/src/presence.rs @@ -174,16 +174,14 @@ mod tests { #[test] fn test_serialise() { let elem: Element = "".parse().unwrap(); - let presence = presence::parse_presence(&elem).unwrap(); - let presence2 = presence::Presence { + let presence = presence::Presence { from: None, to: None, id: None, type_: presence::PresenceType::Unavailable, payloads: vec!(), }; - let elem2 = presence::serialise(&presence2); + let elem2 = presence::serialise(&presence); assert_eq!(elem, elem2); - println!("{:#?}", presence); } }