-
Notifications
You must be signed in to change notification settings - Fork 14
feat!: Allow generic Nodes in HugrMut insert operations #2075
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-rs-v0.16.0 #2075 +/- ##
=====================================================
Coverage ? 82.90%
=====================================================
Files ? 217
Lines ? 41554
Branches ? 37732
=====================================================
Hits ? 34451
Misses ? 5299
Partials ? 1804
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR contains breaking changes to the public Rust API. cargo-semver-checks summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not too familiar with this part of the codebase but generally looks good to me 👍
c443bec
to
c99d022
Compare
c99d022
to
63da208
Compare
`insert_hugr`, `insert_from_view`, and `insert_subgraph` were written before we made `Node` a type generic, and incorrectly assumed the return type maps were always `hugr::Node`s. The methods were either unusable or incorrect when using generic `HugrView`s source/targets with non-base node types. This PR fixes that, and additionally allows us us to have `SiblingSubgraph::extract_subgraph` work for generic `HugrViews`. BREAKING CHANGE: Added Node type parameters to extraction operations in `HugrMut`.
insert_hugr
,insert_from_view
, andinsert_subgraph
were written before we madeNode
a type generic, and incorrectly assumed the return type maps were alwayshugr::Node
s.The methods were either unusable or incorrect when using generic
HugrView
s source/targets with non-base node types.This PR fixes that, and additionally allows us us to have
SiblingSubgraph::extract_subgraph
work for genericHugrViews
.BREAKING CHANGE: Added Node type parameters to extraction operations in
HugrMut
.