File tree Expand file tree Collapse file tree 1 file changed +4
-44
lines changed
Expand file tree Collapse file tree 1 file changed +4
-44
lines changed Original file line number Diff line number Diff line change @@ -82,71 +82,31 @@ impl<'treeseq> LLTree<'treeseq> {
8282 super :: tsk_column_access :: < NodeId , _ , _ , _ > (
8383 u,
8484 self . as_ref ( ) . left_sib ,
85- unsafe {
86- self . as_ref ( )
87- . tree_sequence
88- . as_ref ( )
89- . unwrap ( )
90- . tables
91- . as_ref ( )
92- }
93- . unwrap ( )
94- . nodes
95- . num_rows ,
85+ self . treeseq . num_nodes_raw ( ) + 1 ,
9686 )
9787 }
9888
9989 pub fn right_sib ( & self , u : NodeId ) -> Option < NodeId > {
10090 super :: tsk_column_access :: < NodeId , _ , _ , _ > (
10191 u,
10292 self . as_ref ( ) . right_sib ,
103- unsafe {
104- self . as_ref ( )
105- . tree_sequence
106- . as_ref ( )
107- . unwrap ( )
108- . tables
109- . as_ref ( )
110- }
111- . unwrap ( )
112- . nodes
113- . num_rows ,
93+ self . treeseq . num_nodes_raw ( ) + 1 ,
11494 )
11595 }
11696
11797 pub fn left_child ( & self , u : NodeId ) -> Option < NodeId > {
11898 super :: tsk_column_access :: < NodeId , _ , _ , _ > (
11999 u,
120100 self . as_ref ( ) . left_child ,
121- unsafe {
122- self . as_ref ( )
123- . tree_sequence
124- . as_ref ( )
125- . unwrap ( )
126- . tables
127- . as_ref ( )
128- }
129- . unwrap ( )
130- . nodes
131- . num_rows ,
101+ self . treeseq . num_nodes_raw ( ) + 1 ,
132102 )
133103 }
134104
135105 pub fn right_child ( & self , u : NodeId ) -> Option < NodeId > {
136106 super :: tsk_column_access :: < NodeId , _ , _ , _ > (
137107 u,
138108 self . as_ref ( ) . right_child ,
139- unsafe {
140- self . as_ref ( )
141- . tree_sequence
142- . as_ref ( )
143- . unwrap ( )
144- . tables
145- . as_ref ( )
146- }
147- . unwrap ( )
148- . nodes
149- . num_rows ,
109+ self . treeseq . num_nodes_raw ( ) + 1 ,
150110 )
151111 }
152112
You can’t perform that action at this time.
0 commit comments