-
Notifications
You must be signed in to change notification settings - Fork 734
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
Remove the BoundObject
impl for &Bound
, use Borrowed
instead
#4487
Remove the BoundObject
impl for &Bound
, use Borrowed
instead
#4487
Conversation
c726f8c
to
2bc8b06
Compare
2bc8b06
to
e67b728
Compare
For rationale see PyO3#4467. I chose to make `bound_object_sealed::Sealed` unsafe instead of `BoundObject` so that users won't see the `# Safety` section, as it's not relevant for them.
e67b728
to
809f0d5
Compare
newsfragments/4487.changed.md
Outdated
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.
No need for this as BoundObject
is new in this release; users will never see this change.
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.
Looks great to me, thanks! 👍
/// # Safety | ||
/// | ||
/// Type must be layout-compatible with `*mut ffi::PyObject`. | ||
pub unsafe trait Sealed {} |
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.
Yep I'm happy with the unsafe
guarantee going here where users will never see it 😂
For rationale see #4467.
I chose to make
bound_object_sealed::Sealed
unsafe instead ofBoundObject
so that users won't see the# Safety
section, as it's not relevant for them.
Closes #4467.