We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0891fa commit 7787af3Copy full SHA for 7787af3
uefi/src/result/error.rs
@@ -1,5 +1,5 @@
1
use super::Status;
2
-use core::fmt::Debug;
+use core::fmt::{Debug, Display};
3
4
/// Errors emitted from UEFI entry point must propagate erronerous UEFI statuses,
5
/// and may optionally propagate additional entry point-specific data.
@@ -39,3 +39,9 @@ impl From<Status> for Error<()> {
39
Self { status, data: () }
40
}
41
42
+
43
+impl<Data: Debug + Display> Display for Error<Data> {
44
+ fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
45
+ write!(f, "UEFI Error {}: {}", self.status(), self.data())
46
+ }
47
+}
0 commit comments