Skip to content

Commit

Permalink
Derive Eq trait for FromHexError (#9)
Browse files Browse the repository at this point in the history
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) <j.macadie@ttg.co.uk>
  • Loading branch information
jmacadie and James MacAdie (TT sandbox) authored May 15, 2024
1 parent b055b1e commit 7ceae26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use core::fmt;

/// The error type for decoding a hex string into `Vec<u8>` 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`
Expand Down

0 comments on commit 7ceae26

Please sign in to comment.