-
Notifications
You must be signed in to change notification settings - Fork 53
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 TrustedWindowHandle
#73
Remove TrustedWindowHandle
#73
Conversation
Its usefulness is dubious at best
src/lib.rs
Outdated
unsafe impl<'a, T: HasRawWindowHandle> HasRawWindowHandle for &'a T { | ||
fn raw_window_handle(&self) -> RawWindowHandle { | ||
(*self).raw_window_handle() | ||
} | ||
} | ||
unsafe impl<T: HasRawWindowHandle> HasRawWindowHandle for alloc::rc::Rc<T> { | ||
fn raw_window_handle(&self) -> RawWindowHandle { | ||
(**self).raw_window_handle() | ||
} | ||
} | ||
unsafe impl<T: HasRawWindowHandle> HasRawWindowHandle for alloc::sync::Arc<T> { | ||
fn raw_window_handle(&self) -> RawWindowHandle { | ||
(**self).raw_window_handle() | ||
} | ||
} | ||
|
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 agree with adding these impls since they are consistent with the current wording of the safety guarantees implementors of HasRawWindowHandle
must uphold.
If we find in #71 or likewise that the safety guarantees should change, we can then consider if these impls should change as well.
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.
Yeah, that's my general reasoning behind pushing this through for now.
5593f6e
to
9d0770c
Compare
The impls for |
This looks good. I'll merge it and publish later today. Publishing as 0.4.1 should be fine, since the averted 0.4.0 was only out for like 20 minutes. |
* Update raw-window-handle to `0.4.2` See: - rust-windowing/raw-window-handle#72 - rust-windowing/raw-window-handle#73 - rust-windowing/raw-window-handle#74 * Clean up raw_window_handle functions a bit
As per @Lokathor's request in #72, I have made some changes that I believe need to be made.
TrustedWindowHandle
as its usefulness is somewhat dubious.HasRawWindowHandle
as proposed in Improve safety aroundHasRawWindowHandle
#71.I believe these impls represent a decent enough usability improvement to be added as-is.
cc @pythonesque
PS: I missed a
0.
in the branch name, lol