@@ -15,7 +15,7 @@ use bitflags::bitflags;
15
15
/// check for input/output, some data might be lost.
16
16
#[ repr( C ) ]
17
17
#[ unsafe_protocol( "bb25cf6f-f1d4-11d2-9a0c-0090273fc1fd" ) ]
18
- pub struct Serial < ' boot > {
18
+ pub struct Serial {
19
19
// Revision of this protocol, only 1.0 is currently defined.
20
20
// Future versions will be backwards compatible.
21
21
revision : u32 ,
@@ -33,10 +33,10 @@ pub struct Serial<'boot> {
33
33
get_control_bits : extern "efiapi" fn ( & Serial , & mut ControlBits ) -> Status ,
34
34
write : unsafe extern "efiapi" fn ( & mut Serial , & mut usize , * const u8 ) -> Status ,
35
35
read : unsafe extern "efiapi" fn ( & mut Serial , & mut usize , * mut u8 ) -> Status ,
36
- io_mode : & ' boot IoMode ,
36
+ io_mode : * const IoMode ,
37
37
}
38
38
39
- impl < ' boot > Serial < ' boot > {
39
+ impl Serial {
40
40
/// Reset the device.
41
41
pub fn reset ( & mut self ) -> Result {
42
42
( self . reset ) ( self ) . into ( )
@@ -45,7 +45,7 @@ impl<'boot> Serial<'boot> {
45
45
/// Returns the current I/O mode.
46
46
#[ must_use]
47
47
pub const fn io_mode ( & self ) -> & IoMode {
48
- self . io_mode
48
+ unsafe { & * self . io_mode }
49
49
}
50
50
51
51
/// Sets the device's new attributes.
@@ -115,7 +115,7 @@ impl<'boot> Serial<'boot> {
115
115
}
116
116
}
117
117
118
- impl < ' boot > Write for Serial < ' boot > {
118
+ impl Write for Serial {
119
119
fn write_str ( & mut self , s : & str ) -> core:: fmt:: Result {
120
120
self . write ( s. as_bytes ( ) ) . map_err ( |_| core:: fmt:: Error )
121
121
}
0 commit comments