Skip to content

Commit 23270dd

Browse files
authored
Merge pull request #3837 from nathaniel-bennett/tpacket-debug-fix
Remove `Debug` impls from tpacket_* structs
2 parents e19650d + 5516220 commit 23270dd

File tree

1 file changed

+3
-26
lines changed
  • src/unix/linux_like/linux

1 file changed

+3
-26
lines changed

src/unix/linux_like/linux/mod.rs

+3-26
Original file line numberDiff line numberDiff line change
@@ -1183,15 +1183,18 @@ s_no_extra_traits! {
11831183
pub sched_period: ::__u64,
11841184
}
11851185

1186+
#[allow(missing_debug_implementations)]
11861187
pub union tpacket_req_u {
11871188
pub req: ::tpacket_req,
11881189
pub req3: ::tpacket_req3,
11891190
}
11901191

1192+
#[allow(missing_debug_implementations)]
11911193
pub union tpacket_bd_header_u {
11921194
pub bh1: ::tpacket_hdr_v1,
11931195
}
11941196

1197+
#[allow(missing_debug_implementations)]
11951198
pub struct tpacket_block_desc {
11961199
pub version: ::__u32,
11971200
pub offset_to_priv: ::__u32,
@@ -1617,32 +1620,6 @@ cfg_if! {
16171620
}
16181621
}
16191622

1620-
impl ::fmt::Debug for tpacket_req_u {
1621-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
1622-
f.debug_struct("tpacket_req_u")
1623-
.field("req3", unsafe { &self.req3 })
1624-
.finish()
1625-
}
1626-
}
1627-
1628-
impl ::fmt::Debug for tpacket_bd_header_u {
1629-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
1630-
f.debug_struct("tpacket_bd_header_u")
1631-
.field("bh1", unsafe { &self.bh1 })
1632-
.finish()
1633-
}
1634-
}
1635-
1636-
impl ::fmt::Debug for tpacket_block_desc {
1637-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
1638-
f.debug_struct("tpacket_bd_header_u")
1639-
.field("version", &self.version)
1640-
.field("offset_to_priv", &self.offset_to_priv)
1641-
.field("hdr", &self.hdr)
1642-
.finish()
1643-
}
1644-
}
1645-
16461623
impl ::fmt::Debug for __c_anonymous_ifc_ifcu {
16471624
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
16481625
f.debug_struct("ifr_ifru")

0 commit comments

Comments
 (0)