event loop: Decouple state type from event handler

This commit is contained in:
Dorota Czaplejewicz
2022-11-28 14:39:21 +00:00
parent 23d6beee8e
commit e0b37d60c4
3 changed files with 28 additions and 12 deletions

View File

@ -75,8 +75,8 @@ impl Threaded {
self.thread.send(event)
}
fn handle_loop_event(loop_sender: &Sender, state: event_loop::State, event: Event, ui: &UISender)
-> event_loop::State
fn handle_loop_event(loop_sender: &Sender, state: event_loop::State<Application>, event: Event, ui: &UISender)
-> event_loop::State<Application>
{
let now = Instant::now();