Skip to content

Commit e05ce05

Browse files
committed
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.
1 parent c91a478 commit e05ce05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

uefi/src/data_types/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use core::ptr::NonNull;
88
/// Opaque handle to an UEFI entity (protocol, image...), guaranteed to be non-null.
99
///
1010
/// If you need to have a nullable handle (for a custom UEFI FFI for example) use `Option<Handle>`.
11-
#[derive(Clone, Copy, Debug)]
11+
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
1212
#[repr(transparent)]
1313
pub struct Handle(NonNull<c_void>);
1414

0 commit comments

Comments
 (0)