File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -77,9 +77,8 @@ impl<'treeseq> LLTree<'treeseq> {
7777 self . inner . as_ref ( )
7878 }
7979
80- pub fn left_sib < N : Into < tsk_id_t > + Copy > ( & self , u : N ) -> Option < tsk_id_t > {
81- todo ! ( "doc SAFETY" ) ;
82- super :: tsk_column_access :: < tsk_id_t , _ , _ , _ > (
80+ pub fn left_sib ( & self , u : NodeId ) -> Option < NodeId > {
81+ super :: tsk_column_access :: < NodeId , _ , _ , _ > (
8382 u. into ( ) ,
8483 self . as_ref ( ) . left_sib ,
8584 unsafe {
Original file line number Diff line number Diff line change @@ -101,6 +101,13 @@ impl<'treeseq> Tree<'treeseq> {
101101 pub fn virtual_root ( & self ) -> NodeId {
102102 self . inner . virtual_root ( ) . into ( )
103103 }
104+
105+ /// Get the left sib of node `u`.
106+ ///
107+ /// Returns `None` if `u` is out of range.
108+ pub fn left_sib < N : Into < NodeId > + Copy > ( & self , u : N ) -> Option < NodeId > {
109+ self . inner . left_sib ( u. into ( ) ) . map ( |x| x. into ( ) )
110+ }
104111}
105112
106113impl < ' ts > streaming_iterator:: StreamingIterator for Tree < ' ts > {
You can’t perform that action at this time.
0 commit comments