Skip to content

Commit

Permalink
fix extra_traits build
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Aug 12, 2024
1 parent 8c871b7 commit 9932bac
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 46 deletions.
46 changes: 46 additions & 0 deletions src/unix/bsd/freebsdlike/freebsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2610,6 +2610,52 @@ cfg_if! {
{self.hmac_id}.hash(state);
}
}

impl PartialEq for kinfo_file {
fn eq(&self, other: &kinfo_file) -> bool {
self.kf_structsize == other.kf_structsize &&
self.kf_type == other.kf_type &&
self.kf_fd == other.kf_fd &&
self.kf_ref_count == other.kf_ref_count &&
self.kf_flags == other.kf_flags &&
self.kf_offset == other.kf_offset &&
self.kf_status == other.kf_status &&
self.kf_cap_rights == other.kf_cap_rights &&
self.kf_path
.iter()
.zip(other.kf_path.iter())
.all(|(a,b)| a == b)
}
}
impl Eq for kinfo_file {}
impl ::fmt::Debug for kinfo_file {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("kinfo_file")
.field("kf_structsize", &self.kf_structsize)
.field("kf_type", &self.kf_type)
.field("kf_fd", &self.kf_fd)
.field("kf_ref_count", &self.kf_ref_count)
.field("kf_flags", &self.kf_flags)
.field("kf_offset", &self.kf_offset)
.field("kf_status", &self.kf_status)
.field("kf_cap_rights", &self.kf_cap_rights)
.field("kf_path", &&self.kf_path[..])
.finish()
}
}
impl ::hash::Hash for kinfo_file {
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
self.kf_structsize.hash(state);
self.kf_type.hash(state);
self.kf_fd.hash(state);
self.kf_ref_count.hash(state);
self.kf_flags.hash(state);
self.kf_offset.hash(state);
self.kf_status.hash(state);
self.kf_cap_rights.hash(state);
self.kf_path.hash(state);
}
}
}
}

Expand Down
46 changes: 0 additions & 46 deletions src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,52 +236,6 @@ cfg_if! {
.finish()
}
}

impl PartialEq for kinfo_file {
fn eq(&self, other: &kinfo_file) -> bool {
self.kf_structsize == other.kf_structsize &&
self.kf_type == other.kf_type &&
self.kf_fd == other.kf_fd &&
self.kf_ref_count == other.kf_ref_count &&
self.kf_flags == other.kf_flags &&
self.kf_offset == other.kf_offset &&
self.kf_status == other.kf_status &&
self.kf_cap_rights == other.kf_cap_rights &&
self.kf_path
.iter()
.zip(other.kf_path.iter())
.all(|(a,b)| a == b)
}
}
impl Eq for kinfo_file {}
impl ::fmt::Debug for kinfo_file {
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
f.debug_struct("kinfo_file")
.field("kf_structsize", &self.kf_structsize)
.field("kf_type", &self.kf_type)
.field("kf_fd", &self.kf_fd)
.field("kf_ref_count", &self.kf_ref_count)
.field("kf_flags", &self.kf_flags)
.field("kf_offset", &self.kf_offset)
.field("kf_status", &self.kf_status)
.field("kf_cap_rights", &self.kf_cap_rights)
.field("kf_path", &&self.kf_path[..])
.finish()
}
}
impl ::hash::Hash for kinfo_file {
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
self.kf_structsize.hash(state);
self.kf_type.hash(state);
self.kf_fd.hash(state);
self.kf_ref_count.hash(state);
self.kf_flags.hash(state);
self.kf_offset.hash(state);
self.kf_status.hash(state);
self.kf_cap_rights.hash(state);
self.kf_path.hash(state);
}
}
}
}

Expand Down

0 comments on commit 9932bac

Please sign in to comment.