Skip to content

Commit b67d087

Browse files
Merge pull request #1120 from nicholasbishop/bishop-handle-event-derives
uefi: Add more derives for Handle and Event
2 parents df21017 + c300c68 commit b67d087

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

uefi/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Added
44
- Added `Timestamp` protocol.
55
- Added `UnalignedSlice::as_ptr`.
6+
- Added common derives for `Event` and `Handle`.
67

78
# uefi - 0.27.0 (2024-03-17)
89

uefi/src/data_types/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use core::ptr::{self, 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, Eq, PartialEq)]
11+
#[derive(Clone, Copy, Debug, Hash, Eq, PartialEq, Ord, PartialOrd)]
1212
#[repr(transparent)]
1313
pub struct Handle(NonNull<c_void>);
1414

@@ -51,8 +51,8 @@ impl Handle {
5151
/// Handle to an event structure, guaranteed to be non-null.
5252
///
5353
/// If you need to have a nullable event, use `Option<Event>`.
54+
#[derive(Debug, Eq, PartialEq, Hash, Ord, PartialOrd)]
5455
#[repr(transparent)]
55-
#[derive(Debug)]
5656
pub struct Event(NonNull<c_void>);
5757

5858
impl Event {

0 commit comments

Comments
 (0)