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

add Bound::from_owned_ptr_unchecked (crate-private for now) #4596

Merged
merged 2 commits into from
Oct 5, 2024

Conversation

davidhewitt
Copy link
Member

This adds Bound::from_owned_ptr_unchecked, similar to the method we already have for Borrowed, which allows us to skip check for NULL.

This is really just a micro-optimization to avoid compiling a branch in cases where should be guaranteed never to happen.

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Oct 4, 2024
Copy link
Contributor

@Icxolu Icxolu left a comment

Choose a reason for hiding this comment

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

Sounds reasonable to mirror this API 👍

src/instance.rs Show resolved Hide resolved
Co-authored-by: Icxolu <10486322+Icxolu@users.noreply.github.com>
@davidhewitt davidhewitt added this pull request to the merge queue Oct 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Oct 4, 2024
@davidhewitt davidhewitt added this pull request to the merge queue Oct 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 5, 2024
@davidhewitt davidhewitt added this pull request to the merge queue Oct 5, 2024
Merged via the queue into PyO3:main with commit 720a9be Oct 5, 2024
43 checks passed
@davidhewitt davidhewitt deleted the from_owned_unchecked branch October 5, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants