@@ -15,7 +15,7 @@ use bitflags::bitflags;
1515/// check for input/output, some data might be lost.
1616#[ repr( C ) ]
1717#[ unsafe_protocol( "bb25cf6f-f1d4-11d2-9a0c-0090273fc1fd" ) ]
18- pub struct Serial < ' boot > {
18+ pub struct Serial {
1919 // Revision of this protocol, only 1.0 is currently defined.
2020 // Future versions will be backwards compatible.
2121 revision : u32 ,
@@ -33,10 +33,10 @@ pub struct Serial<'boot> {
3333 get_control_bits : extern "efiapi" fn ( & Serial , & mut ControlBits ) -> Status ,
3434 write : unsafe extern "efiapi" fn ( & mut Serial , & mut usize , * const u8 ) -> Status ,
3535 read : unsafe extern "efiapi" fn ( & mut Serial , & mut usize , * mut u8 ) -> Status ,
36- io_mode : & ' boot IoMode ,
36+ io_mode : * const IoMode ,
3737}
3838
39- impl < ' boot > Serial < ' boot > {
39+ impl Serial {
4040 /// Reset the device.
4141 pub fn reset ( & mut self ) -> Result {
4242 ( self . reset ) ( self ) . into ( )
@@ -45,7 +45,7 @@ impl<'boot> Serial<'boot> {
4545 /// Returns the current I/O mode.
4646 #[ must_use]
4747 pub const fn io_mode ( & self ) -> & IoMode {
48- self . io_mode
48+ unsafe { & * self . io_mode }
4949 }
5050
5151 /// Sets the device's new attributes.
@@ -115,7 +115,7 @@ impl<'boot> Serial<'boot> {
115115 }
116116}
117117
118- impl < ' boot > Write for Serial < ' boot > {
118+ impl Write for Serial {
119119 fn write_str ( & mut self , s : & str ) -> core:: fmt:: Result {
120120 self . write ( s. as_bytes ( ) ) . map_err ( |_| core:: fmt:: Error )
121121 }
0 commit comments