File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 21
21
` HandleBuffer::handles ` and ` ProtocolsPerHandle::protocols ` methods have been
22
22
deprecated.
23
23
- Removed ` 'boot ` lifetime from the ` Output ` protocol.
24
+ - The generic type ` Data ` of ` uefi::Error<Data: Debug> ` doesn't need to be
25
+ ` Display ` to be compatible with ` core::error::Error ` . Note that the error
26
+ Trait requires the ` unstable ` feature.
24
27
25
28
## uefi-macros - [ Unreleased]
26
29
Original file line number Diff line number Diff line change
1
+ //! Module for UEFI-specific error encodings. See [`Error`].
2
+
1
3
use super :: Status ;
2
4
use core:: fmt:: { Debug , Display } ;
3
5
4
- /// Errors emitted from UEFI entry point must propagate erronerous UEFI statuses,
5
- /// and may optionally propagate additional entry point-specific data.
6
+ /// An UEFI-related error with optionally additional payload data. The error
7
+ /// kind is encoded in the `status` field (see [`Status`]). Additional payload
8
+ /// may be inside the `data` field.
6
9
#[ derive( Debug , PartialEq , Eq ) ]
7
10
pub struct Error < Data : Debug = ( ) > {
8
11
status : Status ,
@@ -40,11 +43,11 @@ impl From<Status> for Error<()> {
40
43
}
41
44
}
42
45
43
- impl < Data : Debug + Display > Display for Error < Data > {
46
+ impl < Data : Debug > Display for Error < Data > {
44
47
fn fmt ( & self , f : & mut core:: fmt:: Formatter < ' _ > ) -> core:: fmt:: Result {
45
- write ! ( f, "UEFI Error {}: {}" , self . status( ) , self . data( ) )
48
+ write ! ( f, "UEFI Error {}: {:? }" , self . status( ) , self . data( ) )
46
49
}
47
50
}
48
51
49
52
#[ cfg( feature = "unstable" ) ]
50
- impl < Data : Debug + Display > core:: error:: Error for Error < Data > { }
53
+ impl < Data : Debug > core:: error:: Error for Error < Data > { }
You can’t perform that action at this time.
0 commit comments