Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
cksac committed Dec 19, 2024
1 parent e7d653e commit 049a011
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/composer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ where
}

#[inline(always)]
pub(crate) fn start_scope(&mut self, scope_id: ScopeId) {
pub(crate) fn start_node(&mut self, scope_id: ScopeId) {
let child_idx = self.child_idx_stack.last().cloned();
if self.initialized {
if let Some(child_idx) = child_idx {
Expand Down Expand Up @@ -236,7 +236,7 @@ where
}

#[inline(always)]
pub(crate) fn end_scope(&mut self) {
pub(crate) fn end_node(&mut self) {
let child_count = self.child_idx_stack.pop().unwrap();
let node = &mut self.nodes[self.current_node_key];
let old_child_count = node.children.len();
Expand All @@ -251,7 +251,7 @@ where
}

#[inline(always)]
pub(crate) fn skip_scope(&mut self) {
pub(crate) fn skip_node(&mut self) {
let _ = self.child_idx_stack.pop().unwrap();
let node = &mut self.nodes[self.current_node_key];
if let Some(parent_child_count) = self.child_idx_stack.last_mut() {
Expand Down
1 change: 0 additions & 1 deletion src/recomposer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ where
f.debug_struct("Recomposer")
.field("nodes", &c.nodes)
.field("states", &c.states)
.field("dirty_states", &c.dirty_states)
.finish()
}
}
6 changes: 3 additions & 3 deletions src/scope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@ where
if let Some(key) = c.key_stack.last().copied() {
current_scope.set_key(key);
}
c.start_scope(current_scope.id);
c.start_node(current_scope.id);
let current_node_key = c.current_node_key;
let is_visited = c.composables.contains_key(&current_node_key);
let is_dirty = c.dirty_nodes.contains(&current_node_key);
if !is_dirty && is_visited {
c.skip_scope();
c.skip_node();
return current_node_key;
}
update_node(
Expand All @@ -132,7 +132,7 @@ where
if is_dirty {
c.dirty_nodes.remove(&current_node_key);
}
c.end_scope();
c.end_node();
current_node_key
};
let current_node_key = composable();
Expand Down

0 comments on commit 049a011

Please sign in to comment.