diff --git a/crates/utils/src/interval_map/mod.rs b/crates/utils/src/interval_map/mod.rs index 4ada9438f..97fead88e 100644 --- a/crates/utils/src/interval_map/mod.rs +++ b/crates/utils/src/interval_map/mod.rs @@ -707,11 +707,11 @@ where { /// Initializes the stack fn init_stack(&mut self) { - self.stack = Some(Self::left_tree(self.map_ref, self.map_ref.root)); + self.stack = Some(Self::left_link(self.map_ref, self.map_ref.root)); } - /// Pushes x and x's left sub tree to stack. - fn left_tree(map_ref: &IntervalMap, mut x: NodeIndex) -> Vec> { + /// Pushes a link of nodes on the left to stack. + fn left_link(map_ref: &IntervalMap, mut x: NodeIndex) -> Vec> { let mut nodes = vec![]; while !map_ref.nref(x, Node::is_sentinel) { nodes.push(x); @@ -738,7 +738,7 @@ where return None; } let x = stack.pop().unwrap(); - stack.extend(Self::left_tree( + stack.extend(Self::left_link( self.map_ref, self.map_ref.nref(x, Node::right), ));