From 6eca0b307c56d0bf270fecabd74f4d134c9b6bed Mon Sep 17 00:00:00 2001 From: Angel Yankov Date: Tue, 7 Feb 2023 12:11:38 +0200 Subject: [PATCH] Derive PartialOrd for AttrValue so we can compare them directly when updating numeric attributes. --- matter/src/data_model/objects/attribute.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matter/src/data_model/objects/attribute.rs b/matter/src/data_model/objects/attribute.rs index 0f897e1..faefd0a 100644 --- a/matter/src/data_model/objects/attribute.rs +++ b/matter/src/data_model/objects/attribute.rs @@ -88,7 +88,7 @@ bitflags! { * - instead of arrays, can use linked-lists to conserve space and avoid the internal fragmentation */ -#[derive(PartialEq, Clone)] +#[derive(PartialEq, PartialOrd, Clone)] pub enum AttrValue { Int64(i64), Uint8(u8),