diff --git a/src/tree_item.rs b/src/tree_item.rs index 8ccb6ed..abd3c85 100644 --- a/src/tree_item.rs +++ b/src/tree_item.rs @@ -65,11 +65,7 @@ where /// # Errors /// /// Errors when there are duplicate identifiers in the children. - pub fn new( - identifier: Identifier, - text: T, - children: Vec>, - ) -> std::io::Result + pub fn new(identifier: Identifier, text: T, children: Vec) -> std::io::Result where T: Into>, { @@ -127,7 +123,7 @@ where /// # Errors /// /// Errors when the `identifier` of the `child` already exists in the children. - pub fn add_child(&mut self, child: TreeItem<'a, Identifier>) -> std::io::Result<()> { + pub fn add_child(&mut self, child: Self) -> std::io::Result<()> { let existing = self .children .iter()