Skip to content

Commit d43f24f

Browse files
Switch back to automatic Debug derive for Header struct
The `Header` `Debug` implementation was accidentally printing the `size` field for the `signature`. Rather than just fix that field, switch the whole thing back to using `derive(Debug)`. This adds in the `_reserved` field, which probably doesn't matter much either way but might as well show the whole struct when debug printing.
1 parent 959b9f4 commit d43f24f

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/table/header.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::Revision;
2-
use core::fmt::{Debug, Formatter};
32

43
/// All standard UEFI tables begin with a common header.
4+
#[derive(Debug)]
55
#[repr(C)]
66
pub struct Header {
77
/// Unique identifier for this table.
@@ -16,14 +16,3 @@ pub struct Header {
1616
/// Reserved field that must be set to 0.
1717
_reserved: u32,
1818
}
19-
20-
impl Debug for Header {
21-
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
22-
f.debug_struct("Header")
23-
.field("signature", &(self.size as *const u64))
24-
.field("revision", &self.revision)
25-
.field("size", &self.size)
26-
.field("crc", &self.crc)
27-
.finish()
28-
}
29-
}

0 commit comments

Comments
 (0)