Make DeviceId/WindowId::dummy() safe (#3784)
This commit is contained in:
parent
bf97def398
commit
5b8f5cb54a
15 changed files with 28 additions and 33 deletions
|
|
@ -64,7 +64,7 @@ unsafe impl Sync for PlatformSpecificWindowAttributes {}
|
|||
pub struct DeviceId(u32);
|
||||
|
||||
impl DeviceId {
|
||||
pub const unsafe fn dummy() -> Self {
|
||||
pub const fn dummy() -> Self {
|
||||
DeviceId(0)
|
||||
}
|
||||
}
|
||||
|
|
@ -100,7 +100,7 @@ unsafe impl Send for WindowId {}
|
|||
unsafe impl Sync for WindowId {}
|
||||
|
||||
impl WindowId {
|
||||
pub const unsafe fn dummy() -> Self {
|
||||
pub const fn dummy() -> Self {
|
||||
WindowId(0)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue