fn push_all_nodes(&mut self, node: &'bump VNode<'bump>) -> usize {
        match node {
            VNode::Text(_) | VNode::Placeholder(_) => {
                self.mutations.push_root(node.mounted_id());
                1
            }

            VNode::Fragment(_) | VNode::Component(_) => {
                //
                let mut added = 0;
                for child in node.children() {
                    added += self.push_all_nodes(child);
                }
                added
            }

            VNode::Element(el) => {
                let mut num_on_stack = 0;
                for child in el.children.iter() {
                    num_on_stack += self.push_all_nodes(child);
                }
                self.mutations.push_root(el.id.get().unwrap());

                num_on_stack + 1
            }
        }
    }
// recursively push all the nodes of a tree onto the stack and return how many are there
recursively push all the nodes of a tree onto the stack and return how many are there
recursively push all the nodes of a tree onto the stack and return how many are there
fn push_all_nodes(&mut self, node: &'bump VNode<'bump>) -> usize {
        match node {
            VNode::Text(_) | VNode::Placeholder(_) => {
                self.mutations.push_root(node.mounted_id());
                1
            }
            VNode::Fragment(_) | VNode::Component(_) => {
                //
                let mut added = 0;
                for child in node.children() {
                    added += self.push_all_nodes(child);
                }
                added
            }
            VNode::Element(el) => {
                let mut num_on_stack = 0;
                for child in el.children.iter() {
                    num_on_stack += self.push_all_nodes(child);
                }
                self.mutations.push_root(el.id.get().unwrap());
                num_on_stack + 1
            }
        }
    }
fn push_all_nodes ( & mut self , node : & ' bump VNode < ' bump > ) -> usize { match node { VNode :: Text ( _ ) | VNode :: Placeholder ( _ ) => { self . mutations . push_root ( node . mounted_id ( ) ) ; 1 } VNode :: Fragment ( _ ) | VNode :: Component ( _ ) => { // let mut added = 0 ; for child in node . children ( ) { added += self . push_all_nodes ( child ) ; } added } VNode :: Element ( el ) => { let mut num_on_stack = 0 ; for child in el . children . iter ( ) { num_on_stack += self . push_all_nodes ( child ) ; } self . mutations . push_root ( el . id . get ( ) . unwrap ( ) ) ; num_on_stack + 1 } } }
recursively push all the nodes of a tree onto the stack and return how many are there
recursively push all the nodes of a tree onto the stack and return how many are there
&mut self
node
&'bump VNode<'bump>