From 28c4116565bfe71ef7328f4a34458501ef3dc5b0 Mon Sep 17 00:00:00 2001 From: diogo464 Date: Tue, 16 Dec 2025 14:02:18 +0000 Subject: fixed clippy warnings --- src/command_policy.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/command_policy.rs') 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 @@ /// # async fn turn_on_motor() -> Result<(), ()> { Ok(()) } /// ``` #[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Default)] pub enum CommandPolicy { /// Automatically publish the entity's state when a command is received. + #[default] PublishState, /// Do not automatically publish state. The application must manually update the state. Manual, } -impl Default for CommandPolicy { - fn default() -> Self { - Self::PublishState - } -} -- cgit