Find the index of the ancestor at the given depth, searching backwards from `start_idx`.
(&self, start_idx: usize, target_depth: usize)
| 83 | |
| 84 | /// Find the index of the ancestor at the given depth, searching backwards from `start_idx`. |
| 85 | fn find_ancestor_at_depth(&self, start_idx: usize, target_depth: usize) -> Option<usize> { |
| 86 | (0..start_idx).rev().find(|&j| self.nodes[j].depth == target_depth) |
| 87 | } |
| 88 | |
| 89 | /// Check if `node_idx` is the last direct child of its parent. |
| 90 | fn is_last_child(&self, node_idx: usize) -> bool { |
no outgoing calls
no test coverage detected