Seldom-SE / seldom_state

Component-based state machine plugin for Bevy. Useful for AI, player state, and other entities that occupy different states.
Apache License 2.0
172 stars 18 forks source link

Manual impl Default for EventTrigger #9

Closed akimakinai closed 5 months ago

akimakinai commented 7 months ago

#[derive(Default)] imposes an unnecessary generic bound T: Default for EventTrigger<T>. (https://github.com/rust-lang/rust/issues/26925)

This prevented me to use EventTrigger for anEvent containing Entity (which is !Default) for example, as Default::default is the only way for constructing EventTrigger for users.

Seldom-SE commented 5 months ago

No longer necessary with https://github.com/Seldom-SE/seldom_state/commit/dec8a587903ab5db82e8846c1bad3441742f01d6