Change summary
Cargo.toml | 2 +-
src/lib.rs | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
Detailed changes
@@ -1,6 +1,6 @@
[package]
name = "jid"
-version = "0.3.0"
+version = "0.3.1"
authors = ["lumi <lumi@pew.im>", "Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>"]
description = "A crate which provides a Jid struct for Jabber IDs."
homepage = "https://gitlab.com/lumi/jid-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::*;