@@ -233,15 +233,7 @@ impl EdgeTable {
233233 /// * `Some(child)` if `u` is valid.
234234 /// * `None` otherwise.
235235 pub fn child < E : Into < EdgeId > + Copy > ( & self , row : E ) -> Option < NodeId > {
236- assert ! ( self . num_rows( ) == 0 || !self . as_ref( ) . child. is_null( ) ) ;
237- // SAFETY: either the column is empty or the point is not NULL
238- unsafe {
239- sys:: tsk_column_access :: < NodeId , _ , _ , _ > (
240- row. into ( ) ,
241- self . as_ref ( ) . child ,
242- self . num_rows ( ) ,
243- )
244- }
236+ self . table_ . child ( row. into ( ) )
245237 }
246238
247239 /// Return the ``left`` value from row ``row`` of the table.
@@ -251,15 +243,7 @@ impl EdgeTable {
251243 /// * `Some(position)` if `u` is valid.
252244 /// * `None` otherwise.
253245 pub fn left < E : Into < EdgeId > + Copy > ( & self , row : E ) -> Option < Position > {
254- assert ! ( self . num_rows( ) == 0 || !self . as_ref( ) . left. is_null( ) ) ;
255- // SAFETY: either the column is empty or the point is not NULL
256- unsafe {
257- sys:: tsk_column_access :: < Position , _ , _ , _ > (
258- row. into ( ) ,
259- self . as_ref ( ) . left ,
260- self . num_rows ( ) ,
261- )
262- }
246+ self . table_ . left ( row. into ( ) )
263247 }
264248
265249 /// Return the ``right`` value from row ``row`` of the table.
@@ -269,15 +253,7 @@ impl EdgeTable {
269253 /// * `Some(position)` if `u` is valid.
270254 /// * `None` otherwise.
271255 pub fn right < E : Into < EdgeId > + Copy > ( & self , row : E ) -> Option < Position > {
272- assert ! ( self . num_rows( ) == 0 || !self . as_ref( ) . right. is_null( ) ) ;
273- // SAFETY: either the column is empty or the point is not NULL
274- unsafe {
275- sys:: tsk_column_access :: < Position , _ , _ , _ > (
276- row. into ( ) ,
277- self . as_ref ( ) . right ,
278- self . num_rows ( ) ,
279- )
280- }
256+ self . table_ . left ( row. into ( ) )
281257 }
282258
283259 /// Retrieve decoded metadata for a `row`.
0 commit comments