diff --git a/src/byteorder.rs b/src/byteorder.rs index 7b88049881..56ed0f8498 100644 --- a/src/byteorder.rs +++ b/src/byteorder.rs @@ -63,6 +63,7 @@ use core::{ convert::{TryFrom, TryInto}, fmt::{Binary, Debug, LowerHex, Octal, UpperHex}, + hash::Hash, num::TryFromIntError, }; @@ -81,7 +82,7 @@ use super::*; /// /// [`U32`]: U32 pub trait ByteOrder: - Copy + Clone + Debug + Display + Eq + PartialEq + Ord + PartialOrd + private::Sealed + Copy + Clone + Debug + Display + Eq + PartialEq + Ord + PartialOrd + Hash + private::Sealed { #[doc(hidden)] const ORDER: Order; @@ -104,7 +105,7 @@ pub enum Order { /// Big-endian byte order. /// /// See [`ByteOrder`] for more details. -#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)] +#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum BigEndian {} impl ByteOrder for BigEndian { @@ -121,7 +122,7 @@ impl Display for BigEndian { /// Little-endian byte order. /// /// See [`ByteOrder`] for more details. -#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)] +#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum LittleEndian {} impl ByteOrder for LittleEndian {