From e05ce05f1502b4e89682a88e59fb10c9e7a7396b Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Tue, 30 May 2023 18:49:29 +0200 Subject: [PATCH] uefi: Derive Eq for Handle There is value in checking whether two handles describe the same thing. As EFI handles are just c_void, it's safe to do. --- uefi/src/data_types/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uefi/src/data_types/mod.rs b/uefi/src/data_types/mod.rs index 9646f51f3..2749bd186 100644 --- a/uefi/src/data_types/mod.rs +++ b/uefi/src/data_types/mod.rs @@ -8,7 +8,7 @@ use core::ptr::NonNull; /// Opaque handle to an UEFI entity (protocol, image...), guaranteed to be non-null. /// /// If you need to have a nullable handle (for a custom UEFI FFI for example) use `Option`. -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] #[repr(transparent)] pub struct Handle(NonNull);