struct TreeNode<T> {
    data: T,
    children: Vec<TreeNode<T>>,
}

pub struct Tree<T> {
    root: Option<TreeNode<T>>
}

impl<T> Tree<T> {
    pub fn new() -> Tree<T> {
        Tree { root: None }
    }

    pub fn leaf(val: T) -> Tree<T> {
        Tree { root: Some(TreeNode { data: val, children: vec!() }) }
    }
}

pub enum Tree<T> {
    Nil,
    Node(T, Vec<Tree<T>>),
}

--- 
+++ 
@@ -1,4 +1,18 @@
-pub enum Tree<T> {
-    Nil,
-    Node(T, Vec<Tree<T>>),
+struct TreeNode<T> {
+    data: T,
+    children: Vec<TreeNode<T>>,
 }
+
+pub struct Tree<T> {
+    root: Option<TreeNode<T>>
+}
+
+impl<T> Tree<T> {
+    pub fn new() -> Tree<T> {
+        Tree { root: None }
+    }
+
+    pub fn leaf(val: T) -> Tree<T> {
+        Tree { root: Some(TreeNode { data: val, children: vec!() }) }
+    }
+}
Rewrite Tree data structure, add new() and leaf() methods
