@@ -97,12 +97,12 @@ impl<'a> Iterator for RefCellVecIter<'a> {
9797
9898/// Iterates over children, checking the Display type of the node
9999/// If the node is `Display::Contents`, then we recurse it's children, else we simply push the `NodeId` into the list
100- fn find_children_recursive ( out : & mut Vec < NodeId > , tree : & Taffy , node : NodeId ) {
100+ fn find_children_recursive ( tree : & Taffy , node : NodeId , out : & mut Vec < NodeId > ) {
101101 for child_id in tree. children [ node. into ( ) ] . iter ( ) {
102102 let child_key: DefaultKey = ( * child_id) . into ( ) ;
103103 let display = tree. nodes [ child_key] . style . display ;
104104 match display {
105- Display :: Contents => find_children_recursive ( out , tree, * child_id) ,
105+ Display :: Contents => find_children_recursive ( tree, * child_id, out ) ,
106106 _ => out. push ( * child_id) ,
107107 }
108108 }
@@ -120,7 +120,7 @@ impl LayoutTree for Taffy {
120120 if cache. node_id != node {
121121 cache. node_id = node;
122122 cache. children . clear ( ) ;
123- find_children_recursive ( & mut cache. children , self , node ) ;
123+ find_children_recursive ( self , node , & mut cache. children ) ;
124124 }
125125
126126 // In all cases, return a reference into the cache
0 commit comments