diff --git a/src/hugr.rs b/src/hugr.rs index ec44afa46..322a123c6 100644 --- a/src/hugr.rs +++ b/src/hugr.rs @@ -305,8 +305,7 @@ impl Hugr { /// Add a node to the graph, with the default conversion from OpType to NodeType pub(crate) fn add_op(&mut self, op: impl Into) -> Node { - // TODO: Default to `NodeType::open_extensions` once we can infer extensions - self.add_node(NodeType::pure(op)) + self.add_node(NodeType::open_extensions(op)) } /// Add a node to the graph. diff --git a/src/hugr/hugrmut.rs b/src/hugr/hugrmut.rs index b70d99be8..5f6c46bc8 100644 --- a/src/hugr/hugrmut.rs +++ b/src/hugr/hugrmut.rs @@ -207,7 +207,7 @@ impl + AsMut> HugrMut for T { } fn add_op_before(&mut self, sibling: Node, op: impl Into) -> Result { - let node = self.as_mut().add_node(NodeType::open_extensions(op)); + let node = self.as_mut().add_op(op); self.as_mut() .hierarchy .insert_before(node.index, sibling.index)?;