Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions uefi-raw/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
///
/// This macro implements Debug for you, the way you would expect it to work on
/// Rust enums (printing the variant name instead of its integer value). It also
/// derives Clone, Copy, Eq and PartialEq, since that always makes sense for
/// C-style enums and is used by the implementation. If you want anything else
/// derives Clone, Copy, Eq, PartialEq, Ord, PartialOrd, and Hash, since that
/// always makes sense for C-style enums. If you want anything else
/// to be derived, you can ask for it by adding extra derives as shown in the
/// example below.
///
Expand All @@ -32,7 +32,7 @@
/// ```
/// # use uefi_raw::newtype_enum;
/// newtype_enum! {
/// #[derive(Ord, PartialOrd)]
/// #[derive(Default)]
/// pub enum UnixBool: i32 => #[allow(missing_docs)] {
/// FALSE = 0,
/// TRUE = 1,
Expand All @@ -53,7 +53,7 @@ macro_rules! newtype_enum {
) => {
$(#[$type_attrs])*
#[repr(transparent)]
#[derive(Clone, Copy, Eq, PartialEq)]
#[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)]
$visibility struct $type(pub $base_integer);

$(#[$impl_attrs])*
Expand Down
1 change: 0 additions & 1 deletion uefi-raw/src/table/boot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ newtype_enum! {
/// in the 0x70000000..0xFFFFFFFF range. Therefore, we don't know the full set
/// of memory types at compile time, and it is _not_ safe to model this C enum
/// as a Rust enum.
#[derive(PartialOrd, Ord, Hash)]
pub enum MemoryType: u32 => {
/// This enum variant is not used.
RESERVED = 0,
Expand Down