From 3925723a21d9e2a3d584dc138f5b1468ccb192ba Mon Sep 17 00:00:00 2001 From: nerditation Date: Wed, 30 Aug 2023 09:07:01 +0800 Subject: [PATCH] invariance is maintained by top-level EventLoopWindowTarget this field is transitional and her to keep API compatibility only. the correct variance and such is already ensured by the top-level `EventLoopWindowTarget`, just use `PhantomData` here. --- src/platform_impl/windows/event_loop.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index 8b563d38c0..094f972786 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -219,10 +219,7 @@ pub struct EventLoopWindowTarget { thread_id: u32, thread_msg_target: HWND, pub(crate) runner_shared: EventLoopRunnerShared, - // TODO - // eventually should be removed after all the backends refactored, - // but for now should this be invariant or contra-variant to T? - _marker: PhantomData<*mut T>, + _marker: PhantomData, } impl EventLoop {