diff --git a/src/disco.rs b/src/disco.rs index b4efeee..72dc934 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 2d02a03..9177009 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() } }