diff options
Diffstat (limited to 'src/entity_switch.rs')
| -rw-r--r-- | src/entity_switch.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/entity_switch.rs b/src/entity_switch.rs index c1531eb..2b799a1 100644 --- a/src/entity_switch.rs +++ b/src/entity_switch.rs | |||
| @@ -15,21 +15,13 @@ pub enum SwitchClass { | |||
| 15 | /// | 15 | /// |
| 16 | /// See [`CommandPolicy`] for details on how commands are handled. | 16 | /// See [`CommandPolicy`] for details on how commands are handled. |
| 17 | #[derive(Debug)] | 17 | #[derive(Debug)] |
| 18 | #[derive(Default)] | ||
| 18 | pub struct SwitchConfig { | 19 | pub struct SwitchConfig { |
| 19 | pub common: EntityCommonConfig, | 20 | pub common: EntityCommonConfig, |
| 20 | pub class: SwitchClass, | 21 | pub class: SwitchClass, |
| 21 | pub command_policy: CommandPolicy, | 22 | pub command_policy: CommandPolicy, |
| 22 | } | 23 | } |
| 23 | 24 | ||
| 24 | impl Default for SwitchConfig { | ||
| 25 | fn default() -> Self { | ||
| 26 | Self { | ||
| 27 | common: Default::default(), | ||
| 28 | class: Default::default(), | ||
| 29 | command_policy: CommandPolicy::default(), | ||
| 30 | } | ||
| 31 | } | ||
| 32 | } | ||
| 33 | 25 | ||
| 34 | impl SwitchConfig { | 26 | impl SwitchConfig { |
| 35 | pub(crate) fn populate(&self, config: &mut EntityConfig) { | 27 | pub(crate) fn populate(&self, config: &mut EntityConfig) { |
