diff options
| author | diogo464 <[email protected]> | 2025-12-16 14:02:18 +0000 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-12-16 14:02:20 +0000 |
| commit | 28c4116565bfe71ef7328f4a34458501ef3dc5b0 (patch) | |
| tree | ca0cbefea550122aff5e325c2480e3a7ef421059 /src/command_policy.rs | |
| parent | a16dbf1d55a6f5b28236eef566eea0f44524840c (diff) | |
fixed clippy warnings
Diffstat (limited to 'src/command_policy.rs')
| -rw-r--r-- | src/command_policy.rs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/command_policy.rs b/src/command_policy.rs index 049d56a..e5859bb 100644 --- a/src/command_policy.rs +++ b/src/command_policy.rs | |||
| @@ -64,16 +64,13 @@ | |||
| 64 | /// # async fn turn_on_motor() -> Result<(), ()> { Ok(()) } | 64 | /// # async fn turn_on_motor() -> Result<(), ()> { Ok(()) } |
| 65 | /// ``` | 65 | /// ``` |
| 66 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] | 66 | #[derive(Debug, Clone, Copy, PartialEq, Eq)] |
| 67 | #[derive(Default)] | ||
| 67 | pub enum CommandPolicy { | 68 | pub enum CommandPolicy { |
| 68 | /// Automatically publish the entity's state when a command is received. | 69 | /// Automatically publish the entity's state when a command is received. |
| 70 | #[default] | ||
| 69 | PublishState, | 71 | PublishState, |
| 70 | 72 | ||
| 71 | /// Do not automatically publish state. The application must manually update the state. | 73 | /// Do not automatically publish state. The application must manually update the state. |
| 72 | Manual, | 74 | Manual, |
| 73 | } | 75 | } |
| 74 | 76 | ||
| 75 | impl Default for CommandPolicy { | ||
| 76 | fn default() -> Self { | ||
| 77 | Self::PublishState | ||
| 78 | } | ||
| 79 | } | ||
