Skip to content

Remove Debug impls from tpacket_* structs #3837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 3 additions & 26 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1183,15 +1183,18 @@ s_no_extra_traits! {
pub sched_period: ::__u64,
}

#[allow(missing_debug_implementations)]
pub union tpacket_req_u {
pub req: ::tpacket_req,
pub req3: ::tpacket_req3,
}

#[allow(missing_debug_implementations)]
pub union tpacket_bd_header_u {
pub bh1: ::tpacket_hdr_v1,
}

#[allow(missing_debug_implementations)]
pub struct tpacket_block_desc {
pub version: ::__u32,
pub offset_to_priv: ::__u32,
Expand Down Expand Up @@ -1617,32 +1620,6 @@ cfg_if! {
}
}

impl ::fmt::Debug for tpacket_req_u {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("tpacket_req_u")
.field("req3", unsafe { &self.req3 })
.finish()
}
}

impl ::fmt::Debug for tpacket_bd_header_u {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("tpacket_bd_header_u")
.field("bh1", unsafe { &self.bh1 })
.finish()
}
}

impl ::fmt::Debug for tpacket_block_desc {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("tpacket_bd_header_u")
.field("version", &self.version)
.field("offset_to_priv", &self.offset_to_priv)
.field("hdr", &self.hdr)
.finish()
}
}

impl ::fmt::Debug for __c_anonymous_ifc_ifcu {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("ifr_ifru")
Expand Down