Skip to content

Commit

Permalink
chore: rename method in iterator
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <[email protected]>
  • Loading branch information
bsbds committed Mar 11, 2024
1 parent 7579e18 commit 17e060c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/utils/src/interval_map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T, V, Ix>, mut x: NodeIndex<Ix>) -> Vec<NodeIndex<Ix>> {
/// Pushes a link of nodes on the left to stack.
fn left_link(map_ref: &IntervalMap<T, V, Ix>, mut x: NodeIndex<Ix>) -> Vec<NodeIndex<Ix>> {
let mut nodes = vec![];
while !map_ref.nref(x, Node::is_sentinel) {
nodes.push(x);
Expand All @@ -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),
));
Expand Down

0 comments on commit 17e060c

Please sign in to comment.