From 0c8f09e825c655e4907fe30221ff4a08ffa274f1 Mon Sep 17 00:00:00 2001 From: Joakim Hulthe Date: Mon, 3 Oct 2022 08:31:42 +0200 Subject: [PATCH] Impl Hash for BulbId --- lib/src/lib.rs | 2 +- manager/src/manager.rs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/src/lib.rs b/lib/src/lib.rs index 3f6fe0f..807f4f5 100644 --- a/lib/src/lib.rs +++ b/lib/src/lib.rs @@ -5,7 +5,7 @@ use std::ops::Deref; use std::str::FromStr; /// The mqtt publish id of the bulb -#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd)] +#[derive(Clone, Debug, Serialize, Deserialize, Eq, PartialEq, Ord, PartialOrd, Hash)] pub struct BulbId(pub String); #[derive(Serialize, Deserialize, Default, Debug, Clone)] diff --git a/manager/src/manager.rs b/manager/src/manager.rs index 7157f33..37e0179 100644 --- a/manager/src/manager.rs +++ b/manager/src/manager.rs @@ -283,5 +283,3 @@ impl BulbsState { self.bulbs.read().await } } - -use std::fmt::{self, Display, Formatter};