From f73a3395e2b9877fd40c37b0190e5401456f288f Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 6 Oct 2016 00:58:25 +0300 Subject: [PATCH] Fix invalid constants in patterns --- src/elf.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/elf.rs b/src/elf.rs index 9f9c660..68ab7c7 100644 --- a/src/elf.rs +++ b/src/elf.rs @@ -4,7 +4,7 @@ use core::fmt; pub const ELF_MAGIC: &'static [u8] = &[0x7f, 'E' as u8, 'L' as u8, 'F' as u8]; /// Represents the ELF file class (32-bit vs 64-bit) -#[derive(Copy, Clone, PartialEq)] +#[derive(Copy, Clone, PartialEq, Eq)] pub struct Class(pub u8); /// Invalid ELF file class @@ -33,7 +33,7 @@ impl fmt::Display for Class { } /// Represents the ELF file data format (little-endian vs big-endian) -#[derive(Copy, Clone, PartialEq)] +#[derive(Copy, Clone, PartialEq, Eq)] pub struct Data(pub u8); /// Invalid ELF data format @@ -461,7 +461,7 @@ impl fmt::Display for ProgFlag { } /// Represents ELF Program Header type -#[derive(Copy, Clone, PartialEq)] +#[derive(Copy, Clone, PartialEq, Eq)] pub struct ProgType(pub u32); /// Program header table entry unused @@ -546,7 +546,7 @@ impl fmt::Display for ProgramHeader { } /// Represens ELF Section type -#[derive(Copy, Clone, PartialEq)] +#[derive(Copy, Clone, PartialEq, Eq)] pub struct SectionType(pub u32); /// Inactive section with undefined values @@ -727,7 +727,7 @@ impl fmt::Display for SectionHeader { } } -#[derive(Copy, Clone)] +#[derive(Copy, Clone, PartialEq, Eq)] pub struct SymbolType(pub u8); /// Unspecified symbol type @@ -764,7 +764,7 @@ impl fmt::Display for SymbolType { } } -#[derive(Copy, Clone)] +#[derive(Copy, Clone, PartialEq, Eq)] pub struct SymbolBind(pub u8); /// Local symbol @@ -789,7 +789,7 @@ impl fmt::Display for SymbolBind { } } -#[derive(Copy, Clone)] +#[derive(Copy, Clone, PartialEq, Eq)] pub struct SymbolVis(pub u8); /// Default symbol visibility