File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,21 @@ impl<'treeseq> Tree<'treeseq> {
9999
100100 /// Return the virtual root of the tree.
101101 pub fn virtual_root ( & self ) -> NodeId {
102- self . inner . virtual_root ( ) . into ( )
102+ self . inner . virtual_root ( )
103103 }
104104
105105 /// Get the left sib of node `u`.
106106 ///
107107 /// Returns `None` if `u` is out of range.
108108 pub fn left_sib < N : Into < NodeId > + Copy > ( & self , u : N ) -> Option < NodeId > {
109- self . inner . left_sib ( u. into ( ) ) . map ( |x| x. into ( ) )
109+ self . inner . left_sib ( u. into ( ) )
110+ }
111+
112+ /// Get the right child of node `u`.
113+ ///
114+ /// Returns `None` if `u` is out of range.
115+ pub fn right_child < N : Into < NodeId > + Copy > ( & self , u : N ) -> Option < NodeId > {
116+ self . inner . left_sib ( u. into ( ) )
110117 }
111118}
112119
You can’t perform that action at this time.
0 commit comments