event loop: Decouple event type from handler

This commit is contained in:
Dorota Czaplejewicz
2022-11-28 14:40:35 +00:00
parent e0b37d60c4
commit b8c0836f51

View File

@ -84,9 +84,9 @@ impl<S> State<S> {
/// - 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<S: ActorState<Event = state::Event>>(
fn handle_event<S: ActorState>(
mut loop_state: State<S>,
event: state::Event,
event: S::Event,
now: Instant,
) -> (State<S>, Commands) {
// Calculate changes to send to the consumer,