{ let mut diff = Vec::new(); let removed_nodes = find_removed_nodes (old, new); for removed_node in removed_nodes { diff.push(Diff::RemoveNode(removed_node.clone())); } let added_nodes = find_added_nodes (old, new); for added_node in added_nodes { diff.push(Diff::AddNode(added_node.clone())); } let html = virtual_dom_to_html (&new.element_type); for change in &diff { match change { Diff::AddNode(node) => println!("Added Node: {:?}", node), Diff::RemoveNode(node) => println!("Removed Node: {:?}", node), } } AppResponse { diff, html } }