macros: Allow non-String in generate_elem_id!().
This commit is contained in:
parent
f25d4c79b7
commit
c77221e437
3 changed files with 16 additions and 5 deletions
|
|
@ -302,7 +302,11 @@ mod tests {
|
|||
let elem: Element = "<text xmlns='http://jabber.org/protocol/mood'>Yay!</text>"
|
||||
.parse()
|
||||
.unwrap();
|
||||
let elem2 = elem.clone();
|
||||
let text = Text::try_from(elem).unwrap();
|
||||
assert_eq!(text.0, String::from("Yay!"));
|
||||
|
||||
let elem3 = text.into();
|
||||
assert_eq!(elem2, elem3);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue