From b3df9fedad32c0abd429e5dd06662cd65bd94218 Mon Sep 17 00:00:00 2001 From: ju6ge Date: Sun, 12 Apr 2026 22:17:57 +0200 Subject: [PATCH] basetypes i26 und u26 enable clone and disable warnings --- lib-bms-protocol/src/types.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib-bms-protocol/src/types.rs b/lib-bms-protocol/src/types.rs index 1012c46..b25aeca 100644 --- a/lib-bms-protocol/src/types.rs +++ b/lib-bms-protocol/src/types.rs @@ -56,7 +56,8 @@ pub enum U26Error { ChecksumError, } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] +#[allow(non_camel_case_types)] /// this type is used for storing data on memory devices the concern here is mostly protecting against memory corruption /// du to faulty memory cells. Here one bit errors are the most probabl cause of errors so this types uses a build in /// hemming code for one mit error correction. @@ -132,7 +133,8 @@ impl TryFrom for Stored_U26 { } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] +#[allow(non_camel_case_types)] /// this type is used for transmitting data, the concern here is protection against transmission errors which most likely occur /// as burst errors effecting multiple bits, hemming codes would be a waist of space here so instead a 6 bit crc code is used /// @@ -181,7 +183,8 @@ impl TryFrom for Transit_U26 { } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Clone)] +#[allow(non_camel_case_types)] /// this type is used for transmitting signed 26-bit integer data /// It wraps the Transit_U26 type to provide i32 support /// The i32 value is converted to u32 by casting, preserving the bit pattern