From 2df84cbbfa6a5faf256cf6830ec674cea4f65efc Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Tue, 1 Oct 2024 09:49:03 -0400 Subject: [PATCH] uefi: Derive Eq/PartialEq for GptPartitionEntry --- uefi/CHANGELOG.md | 3 +++ uefi/src/proto/media/partition.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/uefi/CHANGELOG.md b/uefi/CHANGELOG.md index 9f9fbaea3..f41900204 100644 --- a/uefi/CHANGELOG.md +++ b/uefi/CHANGELOG.md @@ -3,6 +3,9 @@ See [Deprecating SystemTable/BootServices/RuntimeServices][funcmigrate] for details of the deprecated items that were removed in this release. +## Added +- Impl `PartialEq` and `Eq` for `GptPartitionEntry`. + ## Changed - **Breaking:** Deleted the deprecated `BootServices`, `RuntimeServices`, and `SystemTable` structs. diff --git a/uefi/src/proto/media/partition.rs b/uefi/src/proto/media/partition.rs index 7ebfe3291..c2b368a9c 100644 --- a/uefi/src/proto/media/partition.rs +++ b/uefi/src/proto/media/partition.rs @@ -157,7 +157,7 @@ impl GptPartitionAttributes { /// GPT/EFI Partition Entry. #[repr(C)] #[repr(packed)] -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct GptPartitionEntry { /// GUID that defines the type of this Partition. A value of zero /// indicates that this partition entry is unused.