From a2fa6a194ea2df6e238ae6f4e6ae8e6d03ca3966 Mon Sep 17 00:00:00 2001 From: Christopher Cole Date: Fri, 5 May 2023 12:01:16 -0700 Subject: [PATCH] Derive Debug on LittleEndian and BigEndian This addresses #33 --- src/endian.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/endian.rs b/src/endian.rs index c925d1d..d07812d 100644 --- a/src/endian.rs +++ b/src/endian.rs @@ -100,7 +100,7 @@ pub trait EndianParse: Clone + Copy + Default + PartialEq + Eq { /// An endian parsing type that can choose at runtime which byte order to parse integers as. /// This is useful for scenarios where a single compiled binary wants to dynamically /// interpret ELF files of any byte order. -#[derive(Debug, Copy, Clone, PartialEq, Eq, Default)] +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub enum AnyEndian { /// Used for a little-endian ELF structures that have been parsed with AnyEndian #[default] @@ -113,14 +113,14 @@ pub enum AnyEndian { /// This is useful for scenarios where a combiled binary knows it only wants to interpret /// little-endian ELF files and doesn't want the performance penalty of evaluating a match /// each time it parses an integer. -#[derive(Clone, Copy, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct LittleEndian; /// A zero-sized type that always parses integers as if they're in big-endian order. /// This is useful for scenarios where a combiled binary knows it only wants to interpret /// big-endian ELF files and doesn't want the performance penalty of evaluating a match /// each time it parses an integer. -#[derive(Clone, Copy, Default, PartialEq, Eq)] +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] pub struct BigEndian; /// A zero-sized type that always parses integers as if they're in the compilation target's native-endian order.