Skip to content

Commit 57189e8

Browse files
uefi: Drop lifetime param from Pointer protocol
This is better expressed with a raw pointer.
1 parent a0f9a0b commit 57189e8

File tree

1 file changed

+4
-4
lines changed
  • uefi/src/proto/console/pointer

1 file changed

+4
-4
lines changed

uefi/src/proto/console/pointer/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ use core::mem::MaybeUninit;
77
/// Provides information about a pointer device.
88
#[repr(C)]
99
#[unsafe_protocol("31878c87-0b75-11d5-9a4f-0090273fc14d")]
10-
pub struct Pointer<'boot> {
10+
pub struct Pointer {
1111
reset: extern "efiapi" fn(this: &mut Pointer, ext_verif: bool) -> Status,
1212
get_state: extern "efiapi" fn(this: &Pointer, state: *mut PointerState) -> Status,
1313
wait_for_input: Event,
14-
mode: &'boot PointerMode,
14+
mode: *const PointerMode,
1515
}
1616

17-
impl<'boot> Pointer<'boot> {
17+
impl Pointer {
1818
/// Resets the pointer device hardware.
1919
///
2020
/// The `extended_verification` parameter is used to request that UEFI
@@ -54,7 +54,7 @@ impl<'boot> Pointer<'boot> {
5454
/// Returns a reference to the pointer device information.
5555
#[must_use]
5656
pub const fn mode(&self) -> &PointerMode {
57-
self.mode
57+
unsafe { &*self.mode }
5858
}
5959
}
6060

0 commit comments

Comments
 (0)