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

feat!: Make some Container methods infallible #872

Merged
merged 3 commits into from
Mar 11, 2024

Conversation

aborgna-q
Copy link
Collaborator

Updated methods that could only return Err on internal bugs.
This is a followup to #869, doing some more cleaning on the build_traits::Container interface.

Changes outside build_traits.rs are just fixing the call sites.

BREAKING CHANGE: Multiple methods in Container no longer return a Result

Updated methods that could only return `Err` on internal bugs.
@aborgna-q aborgna-q requested a review from qartik March 11, 2024 14:07
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

Attention: Patch coverage is 89.41176% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 85.66%. Comparing base (87b9aab) to head (b689412).

Files Patch % Lines
quantinuum-hugr/src/builder/build_traits.rs 84.84% 5 Missing ⚠️
quantinuum-hugr/src/ops/constant.rs 50.00% 0 Missing and 2 partials ⚠️
quantinuum-hugr/src/builder/module.rs 66.66% 1 Missing ⚠️
quantinuum-hugr/src/hugr/validate/test.rs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #872      +/-   ##
==========================================
+ Coverage   85.32%   85.66%   +0.33%     
==========================================
  Files          78       78              
  Lines       14403    14408       +5     
  Branches    14403    14408       +5     
==========================================
+ Hits        12290    12342      +52     
+ Misses       1431     1427       -4     
+ Partials      682      639      -43     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@qartik qartik left a comment

Choose a reason for hiding this comment

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

There are some stray unfinished comments that should be deleted. Otherwise, LGTM.

quantinuum-hugr/src/algorithm/nest_cfgs.rs Outdated Show resolved Hide resolved
quantinuum-hugr/src/algorithm/nest_cfgs.rs Outdated Show resolved Hide resolved
quantinuum-hugr/src/algorithm/nest_cfgs.rs Outdated Show resolved Hide resolved
@aborgna-q aborgna-q enabled auto-merge March 11, 2024 15:52
@aborgna-q aborgna-q added this pull request to the merge queue Mar 11, 2024
Merged via the queue into main with commit 3419fba Mar 11, 2024
8 checks passed
@aborgna-q aborgna-q deleted the feat/infallible-container-methods branch March 11, 2024 15:55
@github-actions github-actions bot mentioned this pull request Mar 8, 2024
@github-actions github-actions bot mentioned this pull request Apr 15, 2024
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