This reverts commit efba2cbfd3
.
Unfortunately, the Docker image for 1.89 has not shown up yet. Once it
has, we should re-land this.
Release Notes:
- N/A
This commit is contained in:
parent
3d662ee282
commit
c7d641ecb8
8 changed files with 55 additions and 35 deletions
|
@ -1,6 +1,28 @@
|
|||
use std::ops::Deref;
|
||||
|
||||
use windows::Win32::UI::WindowsAndMessaging::HCURSOR;
|
||||
use windows::Win32::{Foundation::HANDLE, UI::WindowsAndMessaging::HCURSOR};
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub(crate) struct SafeHandle {
|
||||
raw: HANDLE,
|
||||
}
|
||||
|
||||
unsafe impl Send for SafeHandle {}
|
||||
unsafe impl Sync for SafeHandle {}
|
||||
|
||||
impl From<HANDLE> for SafeHandle {
|
||||
fn from(value: HANDLE) -> Self {
|
||||
SafeHandle { raw: value }
|
||||
}
|
||||
}
|
||||
|
||||
impl Deref for SafeHandle {
|
||||
type Target = HANDLE;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.raw
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub(crate) struct SafeCursor {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue