optionally implement minidom::IntoElements
This commit is contained in:
parent
e0124e50f6
commit
2ffa3dc1d9
1 changed files with 8 additions and 1 deletions
|
@ -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