Skip to content

Commit

Permalink
Fix Todo note (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
Weibye committed Jun 12, 2022
1 parent 7283137 commit a2eff07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl Taffy {
) -> Result<Node, error::InvalidChild> {
let node_id = self.find_node(parent).map_err(|e| error::InvalidChild::InvalidParentNode(e.0))?;
let child_id = self.find_node(new_child).map_err(|e| error::InvalidChild::InvalidChildNode(e.0))?;
// TODO: index check

let child_count = self.forest.children[node_id].len();
if child_index >= child_count {
return Err(error::InvalidChild::ChildIndexOutOfBounds { parent, child_index, child_count });
Expand Down

0 comments on commit a2eff07

Please sign in to comment.