Remove generic parameter T from EventLoopWindowTarget (#3298)

This commit is contained in:
Mads Marquart 2024-01-13 21:36:53 +01:00 committed by GitHub
parent 169cd39f93
commit 22311802b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 174 additions and 210 deletions

View file

@ -2,7 +2,6 @@ use std::cell::{Cell, RefCell};
use std::clone::Clone;
use std::collections::{vec_deque::IntoIter as VecDequeIter, VecDeque};
use std::iter;
use std::marker::PhantomData;
use std::rc::{Rc, Weak};
use web_sys::Element;
@ -43,28 +42,17 @@ impl Clone for ModifiersShared {
}
}
pub struct EventLoopWindowTarget<T: 'static> {
#[derive(Clone)]
pub struct EventLoopWindowTarget {
pub(crate) runner: runner::Shared,
modifiers: ModifiersShared,
_marker: PhantomData<T>,
}
impl<T> Clone for EventLoopWindowTarget<T> {
fn clone(&self) -> Self {
Self {
runner: self.runner.clone(),
modifiers: self.modifiers.clone(),
_marker: PhantomData,
}
}
}
impl<T> EventLoopWindowTarget<T> {
impl EventLoopWindowTarget {
pub fn new() -> Self {
Self {
runner: runner::Shared::new(),
modifiers: ModifiersShared::default(),
_marker: PhantomData,
}
}