Skip to content

Commit

Permalink
invariance is maintained by top-level EventLoopWindowTarget<T>
Browse files Browse the repository at this point in the history
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<T>` here.
  • Loading branch information
nerditation committed Aug 30, 2023
1 parent 20a16f6 commit 3925723
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/platform_impl/windows/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,7 @@ pub struct EventLoopWindowTarget<T: 'static> {
thread_id: u32,
thread_msg_target: HWND,
pub(crate) runner_shared: EventLoopRunnerShared<UserEventPlaceholder>,
// 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<T>,
}

impl<T: 'static> EventLoop<T> {
Expand Down

0 comments on commit 3925723

Please sign in to comment.