Merge branch 'minidom' into 'master'

Implement IntoElements on Jid

See merge request lumi/jid-rs!9
This commit is contained in:
lumi 2017-10-31 21:47:25 +00:00
commit 92723a2f13
2 changed files with 9 additions and 2 deletions

View file

@ -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"

View file

@ -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::*;