PadExt.get_sticky_event(EventType, idx) can be more type-aware
get_sticky_event(EventType, idx)
can only return events of type EventType
, but the return value is Option<Event>
, so if you match on it, you will get an error about missing arms, even though no other Event
type can be returned.
If this can't be fixed, we probably need a new manual function of type func<T>() -> T
or something?