Merge branch 'minidom' into 'master'
Implement IntoElements on Jid See merge request lumi/jid-rs!9
This commit is contained in:
commit
92723a2f13
2 changed files with 9 additions and 2 deletions
|
|
@ -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::*;
|
||||
|
|
|
|||
Loading…
Reference in a new issue