From b8c0836f515dd26e0ed57639b602c20473fd0d84 Mon Sep 17 00:00:00 2001 From: Dorota Czaplejewicz Date: Mon, 28 Nov 2022 14:40:35 +0000 Subject: [PATCH] event loop: Decouple event type from handler --- src/event_loop/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/event_loop/mod.rs b/src/event_loop/mod.rs index 6771403f..26eb14f2 100644 --- a/src/event_loop/mod.rs +++ b/src/event_loop/mod.rs @@ -84,9 +84,9 @@ impl State { /// - determines next scheduled animation wakeup, /// and because this is a pure function, it's easily testable. /// It returns the new state, and the message to send onwards. -fn handle_event>( +fn handle_event( mut loop_state: State, - event: state::Event, + event: S::Event, now: Instant, ) -> (State, Commands) { // Calculate changes to send to the consumer,