File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11use std:: cell:: { Cell , RefCell } ;
22use std:: ffi:: c_void;
3- use std:: marker:: PhantomData ;
43use std:: ptr;
54use std:: sync:: atomic:: { AtomicBool , Ordering } ;
65use std:: sync:: Arc ;
@@ -38,9 +37,6 @@ pub struct WindowHandle {
3837 raw_window_handle : Option < RawWindowHandle > ,
3938 close_requested : Arc < AtomicBool > ,
4039 is_open : Arc < AtomicBool > ,
41-
42- // Ensure handle is !Send
43- _phantom : PhantomData < * mut ( ) > ,
4440}
4541
4642impl WindowHandle {
@@ -81,7 +77,6 @@ impl ParentHandle {
8177 raw_window_handle : Some ( raw_window_handle) ,
8278 close_requested : Arc :: clone ( & close_requested) ,
8379 is_open : Arc :: clone ( & is_open) ,
84- _phantom : PhantomData :: default ( ) ,
8580 } ;
8681
8782 ( Self { _close_requested : close_requested, is_open } , handle)
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ use winapi::um::winuser::{
2121use std:: cell:: { Cell , Ref , RefCell , RefMut } ;
2222use std:: collections:: VecDeque ;
2323use std:: ffi:: { c_void, OsStr } ;
24- use std:: marker:: PhantomData ;
2524use std:: os:: windows:: ffi:: OsStrExt ;
2625use std:: ptr:: null_mut;
2726use std:: rc:: Rc ;
@@ -68,9 +67,6 @@ const WIN_FRAME_TIMER: usize = 4242;
6867pub struct WindowHandle {
6968 hwnd : Option < HWND > ,
7069 is_open : Rc < Cell < bool > > ,
71-
72- // Ensure handle is !Send
73- _phantom : PhantomData < * mut ( ) > ,
7470}
7571
7672impl WindowHandle {
@@ -108,11 +104,7 @@ impl ParentHandle {
108104 pub fn new ( hwnd : HWND ) -> ( Self , WindowHandle ) {
109105 let is_open = Rc :: new ( Cell :: new ( true ) ) ;
110106
111- let handle = WindowHandle {
112- hwnd : Some ( hwnd) ,
113- is_open : Rc :: clone ( & is_open) ,
114- _phantom : PhantomData :: default ( ) ,
115- } ;
107+ let handle = WindowHandle { hwnd : Some ( hwnd) , is_open : Rc :: clone ( & is_open) } ;
116108
117109 ( Self { is_open } , handle)
118110 }
Original file line number Diff line number Diff line change 11use std:: ffi:: c_void;
2- use std:: marker:: PhantomData ;
32use std:: sync:: atomic:: { AtomicBool , Ordering } ;
43use std:: sync:: mpsc;
54use std:: sync:: Arc ;
@@ -28,9 +27,6 @@ pub struct WindowHandle {
2827 raw_window_handle : Option < RawWindowHandle > ,
2928 close_requested : Arc < AtomicBool > ,
3029 is_open : Arc < AtomicBool > ,
31-
32- // Ensure handle is !Send
33- _phantom : PhantomData < * mut ( ) > ,
3430}
3531
3632impl WindowHandle {
@@ -75,7 +71,6 @@ impl ParentHandle {
7571 raw_window_handle : None ,
7672 close_requested : Arc :: clone ( & close_requested) ,
7773 is_open : Arc :: clone ( & is_open) ,
78- _phantom : PhantomData :: default ( ) ,
7974 } ;
8075
8176 ( Self { close_requested, is_open } , handle)
You can’t perform that action at this time.
0 commit comments