diff --git a/src/hugr/hugrmut.rs b/src/hugr/hugrmut.rs index 2baca50af..360011bb5 100644 --- a/src/hugr/hugrmut.rs +++ b/src/hugr/hugrmut.rs @@ -65,15 +65,6 @@ pub trait HugrMut: HugrMutInternals { self.hugr_mut().add_op_before(sibling, op) } - /// A generalisation of [`HugrMut::add_op_before`], needed temporarily until - /// add_op type methods all default to creating nodes with open extensions. - /// See issue #424 - #[inline] - fn add_node_before(&mut self, sibling: Node, nodetype: NodeType) -> Result { - self.valid_non_root(sibling)?; - self.hugr_mut().add_node_before(sibling, nodetype) - } - /// Add a node to the graph as the next sibling of another node. /// /// The sibling node's parent becomes the new node's parent. @@ -215,11 +206,7 @@ impl + AsMut> HugrMut for T { } fn add_op_before(&mut self, sibling: Node, op: impl Into) -> Result { - self.add_node_before(sibling, NodeType::open_extensions(op)) - } - - fn add_node_before(&mut self, sibling: Node, nodetype: NodeType) -> Result { - let node = self.as_mut().add_node(nodetype); + let node = self.as_mut().add_node(NodeType::open_extensions(op)); self.as_mut() .hierarchy .insert_before(node.index, sibling.index)?;