Skip to content

Commit

Permalink
Change some callers of add_node_before to use add_op_before
Browse files Browse the repository at this point in the history
  • Loading branch information
acl-cqc committed Oct 24, 2023
1 parent 7f7b799 commit 3998b8e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/builder/conditional.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,7 @@ impl<B: AsMut<Hugr> + AsRef<Hugr>> ConditionalBuilder<B> {
let case_node =
// add case before any existing subsequent cases
if let Some(&sibling_node) = self.case_nodes[case + 1..].iter().flatten().next() {
// TODO: Allow this to be non-pure
self.hugr_mut().add_node_before(sibling_node, NodeType::open_extensions(case_op))?
self.hugr_mut().add_op_before(sibling_node, case_op)?
} else {
self.add_child_node(NodeType::open_extensions(case_op))?
};
Expand Down
2 changes: 1 addition & 1 deletion src/extension/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ mod test {
}),
)?;

let entry = hugr.add_node_before(exit, NodeType::open_extensions(dfb))?;
let entry = hugr.add_op_before(exit,dfb)?;
let entry_in = hugr.add_node_with_parent(
entry,
NodeType::open_extensions(ops::Input { types: inputs }),
Expand Down

0 comments on commit 3998b8e

Please sign in to comment.