Closed a-canya closed 2 years ago
Looks good. Keep in mind the panic won't have the message either.
One way to workaround the issue of panic with no message would be to change the Event's msg method to always call done
even if the event is nil
. The nil
check would have to be moved from Msg
/Msgf
to msg
.
Ignore my previous message, you can't have a nil
event and e.done
set…
That's true... The only workaround I can think of is to make the event be non-nil when it is disabled, and instead have an extra bool field in the struct to indicate that the event is disabled. Then apart of nil checks we would also need to check that the event is not disabled. This means more changes and I'm not sure what other implicactions it might have.
True, I'm not a big fan of such large change. Let's see if this trips more people as it's a bit of an edge case.
Issue #392