Skip to content

Commit 9932bac

Browse files
committed
fix extra_traits build
1 parent 8c871b7 commit 9932bac

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2610,6 +2610,52 @@ cfg_if! {
26102610
{self.hmac_id}.hash(state);
26112611
}
26122612
}
2613+
2614+
impl PartialEq for kinfo_file {
2615+
fn eq(&self, other: &kinfo_file) -> bool {
2616+
self.kf_structsize == other.kf_structsize &&
2617+
self.kf_type == other.kf_type &&
2618+
self.kf_fd == other.kf_fd &&
2619+
self.kf_ref_count == other.kf_ref_count &&
2620+
self.kf_flags == other.kf_flags &&
2621+
self.kf_offset == other.kf_offset &&
2622+
self.kf_status == other.kf_status &&
2623+
self.kf_cap_rights == other.kf_cap_rights &&
2624+
self.kf_path
2625+
.iter()
2626+
.zip(other.kf_path.iter())
2627+
.all(|(a,b)| a == b)
2628+
}
2629+
}
2630+
impl Eq for kinfo_file {}
2631+
impl ::fmt::Debug for kinfo_file {
2632+
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
2633+
f.debug_struct("kinfo_file")
2634+
.field("kf_structsize", &self.kf_structsize)
2635+
.field("kf_type", &self.kf_type)
2636+
.field("kf_fd", &self.kf_fd)
2637+
.field("kf_ref_count", &self.kf_ref_count)
2638+
.field("kf_flags", &self.kf_flags)
2639+
.field("kf_offset", &self.kf_offset)
2640+
.field("kf_status", &self.kf_status)
2641+
.field("kf_cap_rights", &self.kf_cap_rights)
2642+
.field("kf_path", &&self.kf_path[..])
2643+
.finish()
2644+
}
2645+
}
2646+
impl ::hash::Hash for kinfo_file {
2647+
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
2648+
self.kf_structsize.hash(state);
2649+
self.kf_type.hash(state);
2650+
self.kf_fd.hash(state);
2651+
self.kf_ref_count.hash(state);
2652+
self.kf_flags.hash(state);
2653+
self.kf_offset.hash(state);
2654+
self.kf_status.hash(state);
2655+
self.kf_cap_rights.hash(state);
2656+
self.kf_path.hash(state);
2657+
}
2658+
}
26132659
}
26142660
}
26152661

src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -236,52 +236,6 @@ cfg_if! {
236236
.finish()
237237
}
238238
}
239-
240-
impl PartialEq for kinfo_file {
241-
fn eq(&self, other: &kinfo_file) -> bool {
242-
self.kf_structsize == other.kf_structsize &&
243-
self.kf_type == other.kf_type &&
244-
self.kf_fd == other.kf_fd &&
245-
self.kf_ref_count == other.kf_ref_count &&
246-
self.kf_flags == other.kf_flags &&
247-
self.kf_offset == other.kf_offset &&
248-
self.kf_status == other.kf_status &&
249-
self.kf_cap_rights == other.kf_cap_rights &&
250-
self.kf_path
251-
.iter()
252-
.zip(other.kf_path.iter())
253-
.all(|(a,b)| a == b)
254-
}
255-
}
256-
impl Eq for kinfo_file {}
257-
impl ::fmt::Debug for kinfo_file {
258-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
259-
f.debug_struct("kinfo_file")
260-
.field("kf_structsize", &self.kf_structsize)
261-
.field("kf_type", &self.kf_type)
262-
.field("kf_fd", &self.kf_fd)
263-
.field("kf_ref_count", &self.kf_ref_count)
264-
.field("kf_flags", &self.kf_flags)
265-
.field("kf_offset", &self.kf_offset)
266-
.field("kf_status", &self.kf_status)
267-
.field("kf_cap_rights", &self.kf_cap_rights)
268-
.field("kf_path", &&self.kf_path[..])
269-
.finish()
270-
}
271-
}
272-
impl ::hash::Hash for kinfo_file {
273-
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
274-
self.kf_structsize.hash(state);
275-
self.kf_type.hash(state);
276-
self.kf_fd.hash(state);
277-
self.kf_ref_count.hash(state);
278-
self.kf_flags.hash(state);
279-
self.kf_offset.hash(state);
280-
self.kf_status.hash(state);
281-
self.kf_cap_rights.hash(state);
282-
self.kf_path.hash(state);
283-
}
284-
}
285239
}
286240
}
287241

0 commit comments

Comments
 (0)