diff --git a/src/disco.rs b/src/disco.rs index b4efeee9..72dc934a 100644 --- a/src/disco.rs +++ b/src/disco.rs @@ -377,6 +377,8 @@ mod tests { fn test_answers_items_result() { let elem: Element = "".parse().unwrap(); let query = DiscoItemsResult::try_from(elem).unwrap(); + let elem2 = Element::from(query); + let query = DiscoItemsResult::try_from(elem2).unwrap(); assert_eq!(query.items.len(), 2); assert_eq!(query.items[0].jid, Jid::from_str("component").unwrap()); assert_eq!(query.items[0].node, None); diff --git a/src/macros.rs b/src/macros.rs index 2d02a033..9177009d 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -340,6 +340,9 @@ macro_rules! generate_element_with_children { $( .attr($attr_name, elem.$attr) )* + $( + .append(elem.$child_ident) + )* .build() } }