Skip to content

Commit

Permalink
Derive Debug on LittleEndian and BigEndian
Browse files Browse the repository at this point in the history
This addresses #33
  • Loading branch information
cole14 committed May 5, 2023
1 parent 969c184 commit a2fa6a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/endian.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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.
Expand Down

0 comments on commit a2fa6a1

Please sign in to comment.