Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove add_node_before #617

Closed
wants to merge 1 commit into from
Closed

Conversation

croyzor
Copy link
Contributor

@croyzor croyzor commented Oct 23, 2023

No description provided.

@croyzor croyzor requested a review from acl-cqc October 23, 2023 13:00

fn add_node_before(&mut self, sibling: Node, nodetype: NodeType) -> Result<Node, HugrError> {
let node = self.as_mut().add_node(nodetype);
let node = self.as_mut().add_node(NodeType::open_extensions(op));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove add_node too, but I'll open another PR for that

@croyzor croyzor changed the title cleanup: Remove add_node_before refactor: Remove add_node_before Oct 23, 2023
Copy link
Contributor

@acl-cqc acl-cqc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm very nervous of this on its own because it leaves add_op_before using open_extensions whereas add_op_with_parent uses pure....

However, perhaps we can just fold #618 into this. Does that pass tests?

@acl-cqc
Copy link
Contributor

acl-cqc commented Nov 6, 2023

I think we can drop this following #622 ??

@croyzor croyzor closed this Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants