diff --git a/src/trigger.rs b/src/trigger.rs index abd3268..681de79 100644 --- a/src/trigger.rs +++ b/src/trigger.rs @@ -292,7 +292,7 @@ impl DoneTrigger { } /// Trigger that transitions when it receives the associated event -#[derive(Debug, Default, Clone, Copy)] +#[derive(Debug, Clone, Copy)] pub struct EventTrigger(PhantomData); impl OptionTrigger for EventTrigger { @@ -308,6 +308,13 @@ impl OptionTrigger for EventTrigger { } } +// derive(Default) requires `T: Default` +impl Default for EventTrigger { + fn default() -> Self { + Self(PhantomData) + } +} + pub(crate) fn remove_done_markers(mut commands: Commands, dones: Query>) { for done in &dones { commands.entity(done).remove::();