From 7ceae265513d0316a79148e0e26058f9adfa4274 Mon Sep 17 00:00:00 2001 From: James MacAdie Date: Wed, 15 May 2024 16:20:46 +0100 Subject: [PATCH] Derive Eq trait for FromHexError (#9) Without this we cannot derive Eq on enums & structs that contain a FromHexError. It is trivial to derive since all the elements of FromHexError implement Eq already Co-authored-by: James MacAdie (TT sandbox) --- src/error.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index f57c373..2b4719f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -3,7 +3,7 @@ use core::fmt; /// The error type for decoding a hex string into `Vec` or `[u8; N]`. -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[allow(clippy::module_name_repetitions)] pub enum FromHexError { /// An invalid character was found. Valid ones are: `0...9`, `a...f`