Skip to content

Commit 09fd4ce

Browse files
authored
Merge pull request #147 from rust-osdev/dev2
tree-wide: streamline default derives (also Hash everywhere)
2 parents 310b103 + 85b1d83 commit 09fd4ce

24 files changed

+37
-37
lines changed

multiboot2-header/src/address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use core::mem::size_of;
55
/// format, but it must be provided if the image is in a.out format or in some
66
/// other format. Required for legacy boot (BIOS).
77
/// Determines load addresses.
8-
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
8+
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
99
#[repr(C)]
1010
pub struct AddressHeaderTag {
1111
typ: HeaderTagType,

multiboot2-header/src/console.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub enum ConsoleHeaderTagFlags {
1313

1414
/// Tells that a console must be available in MBI.
1515
/// Only relevant for legacy BIOS.
16-
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
16+
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
1717
#[repr(C)]
1818
pub struct ConsoleHeaderTag {
1919
typ: HeaderTagType,

multiboot2-header/src/end.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::{HeaderTagFlag, HeaderTagType};
22
use core::mem::size_of;
33

44
/// Terminates a list of optional tags in a Multiboot2 header.
5-
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
5+
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
66
#[repr(C)]
77
pub struct EndHeaderTag {
88
// u16 value

multiboot2-header/src/entry_address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use core::mem::size_of;
55

66
/// Specifies the physical address to which the boot loader should jump in
77
/// order to start running the operating system. Not needed for ELF files.
8-
#[derive(Copy, Clone, PartialEq, Eq)]
8+
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
99
#[repr(C)]
1010
pub struct EntryAddressHeaderTag {
1111
typ: HeaderTagType,

multiboot2-header/src/entry_efi_32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use core::mem::size_of;
99
///
1010
/// Technically, this is equivalent to the [`crate::EntryAddressHeaderTag`] but with a different
1111
/// [`crate::HeaderTagType`].
12-
#[derive(Copy, Clone, PartialEq, Eq)]
12+
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1313
#[repr(C)]
1414
pub struct EntryEfi32HeaderTag {
1515
typ: HeaderTagType,

multiboot2-header/src/entry_efi_64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use core::mem::size_of;
99
///
1010
/// Technically, this is equivalent to the [`crate::EntryAddressHeaderTag`] but with a different
1111
/// [`crate::HeaderTagType`].
12-
#[derive(Copy, Clone, PartialEq, Eq)]
12+
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1313
#[repr(C)]
1414
pub struct EntryEfi64HeaderTag {
1515
typ: HeaderTagType,

multiboot2-header/src/framebuffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use core::mem::size_of;
55
/// is present the bootloader assumes that the payload
66
/// has framebuffer support. Note: This is only a
77
/// recommended mode. Only relevant on legacy BIOS.
8-
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
8+
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
99
#[repr(C)]
1010
pub struct FramebufferHeaderTag {
1111
typ: HeaderTagType,

multiboot2-header/src/header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ impl core::error::Error for LoadError {}
226226
///
227227
/// The "basic" Multiboot2 header. This means only the properties, that are known during
228228
/// compile time. All other information are derived during runtime from the size property.
229-
#[derive(Copy, Clone, PartialEq, Eq)]
229+
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
230230
#[repr(C)]
231231
pub struct Multiboot2BasicHeader {
232232
/// Must be the value of [`MULTIBOOT2_HEADER_MAGIC`].

multiboot2-header/src/information_request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use multiboot2::TagType;
88

99
/// Specifies what specific tag types the bootloader should provide
1010
/// inside the mbi.
11-
#[derive(Copy, Clone, PartialEq, Eq)]
11+
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1212
#[repr(C)]
1313
pub struct InformationRequestHeaderTag<const N: usize> {
1414
typ: HeaderTagType,

multiboot2-header/src/module_align.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::{HeaderTagFlag, HeaderTagType};
22
use core::mem::size_of;
33

44
/// If this tag is present, provided boot modules must be page aligned.
5-
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
5+
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
66
#[repr(C)]
77
pub struct ModuleAlignHeaderTag {
88
typ: HeaderTagType,

0 commit comments

Comments
 (0)