From 2ffa3dc1d9efb6da99cc2f5c7b93c063887bec40 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 31 Oct 2017 20:24:41 +0000 Subject: [PATCH 1/2] optionally implement minidom::IntoElements --- src/lib.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 30ba7f7a03ce71dce5861600c2849e53e008be9b..f0280d99aab1fa1670c06031411e0795686118ef 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -363,7 +363,7 @@ impl Jid { extern crate minidom; #[cfg(feature = "minidom")] -use minidom::IntoAttributeValue; +use minidom::{IntoAttributeValue, IntoElements, ElementEmitter}; #[cfg(feature = "minidom")] impl IntoAttributeValue for Jid { @@ -372,6 +372,13 @@ impl IntoAttributeValue for Jid { } } +#[cfg(feature = "minidom")] +impl IntoElements for Jid { + fn into_elements(self, emitter: &mut ElementEmitter) { + emitter.append_text_node(String::from(self)) + } +} + #[cfg(test)] mod tests { use super::*; From 5185c0bb9ef22bdc25e80d5e739aa6e55dd91ff1 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Tue, 31 Oct 2017 20:24:47 +0000 Subject: [PATCH 2/2] bump version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 57783567112121287eb378667f1216ce37bfdd1c..e87ebc91d8e10a5b153fddc56ef26cd2a4d4baea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jid" -version = "0.3.0" +version = "0.3.1" authors = ["lumi ", "Emmanuel Gil Peyrot "] description = "A crate which provides a Jid struct for Jabber IDs." homepage = "https://gitlab.com/lumi/jid-rs"