1 2 3 4 5 6 7 8 9 10
use crate::Node; impl<'a> From<Node<&'a str>> for Node<String> { fn from(node: Node<&'a str>) -> Self { Self { data: node.data.to_string(), children: node.children.into_iter().map(Into::into).collect(), } } }