Remove generic parameter T from EventLoopWindowTarget (#3298)
This commit is contained in:
parent
169cd39f93
commit
22311802b5
37 changed files with 174 additions and 210 deletions
|
|
@ -66,7 +66,7 @@ pub trait EventLoopExtRunOnDemand {
|
|||
/// [`set_control_flow()`]: EventLoopWindowTarget::set_control_flow()
|
||||
fn run_on_demand<F>(&mut self, event_handler: F) -> Result<(), EventLoopError>
|
||||
where
|
||||
F: FnMut(Event<Self::UserEvent>, &EventLoopWindowTarget<Self::UserEvent>);
|
||||
F: FnMut(Event<Self::UserEvent>, &EventLoopWindowTarget);
|
||||
}
|
||||
|
||||
impl<T> EventLoopExtRunOnDemand for EventLoop<T> {
|
||||
|
|
@ -74,14 +74,14 @@ impl<T> EventLoopExtRunOnDemand for EventLoop<T> {
|
|||
|
||||
fn run_on_demand<F>(&mut self, event_handler: F) -> Result<(), EventLoopError>
|
||||
where
|
||||
F: FnMut(Event<Self::UserEvent>, &EventLoopWindowTarget<Self::UserEvent>),
|
||||
F: FnMut(Event<Self::UserEvent>, &EventLoopWindowTarget),
|
||||
{
|
||||
self.event_loop.window_target().clear_exit();
|
||||
self.event_loop.run_on_demand(event_handler)
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> EventLoopWindowTarget<T> {
|
||||
impl EventLoopWindowTarget {
|
||||
/// Clear exit status.
|
||||
pub(crate) fn clear_exit(&self) {
|
||||
self.p.clear_exit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue