Make DeviceId/WindowId::dummy() safe (#3784)

This commit is contained in:
daxpedda 2024-07-14 13:14:32 +02:00 committed by GitHub
parent bf97def398
commit 5b8f5cb54a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 28 additions and 33 deletions

View file

@ -31,7 +31,7 @@ pub(crate) use crate::platform_impl::Fullscreen;
pub struct DeviceId;
impl DeviceId {
pub const unsafe fn dummy() -> Self {
pub const fn dummy() -> Self {
DeviceId
}
}

View file

@ -699,7 +699,7 @@ pub struct WindowId {
}
impl WindowId {
pub const unsafe fn dummy() -> Self {
pub const fn dummy() -> Self {
WindowId { window: std::ptr::null_mut() }
}
}