Skip to content

Commit

Permalink
Missing extra_traits impls for os_unfair_lock
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcc committed Oct 5, 2022
1 parent 26be428 commit 13bf355
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/unix/bsd/apple/mod.rs
Expand Up @@ -2583,6 +2583,27 @@ cfg_if! {
l2p_devoffset.hash(state);
}
}
impl PartialEq for os_unfair_lock {
fn eq(&self, other: &os_unfair_lock) -> bool {
self._os_unfair_lock_opaque == other._os_unfair_lock_opaque
}
}

impl Eq for os_unfair_lock {}

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

impl ::hash::Hash for os_unfair_lock {
fn hash<H: ::hash::Hasher>(&self, state: &mut H) {
self._os_unfair_lock_opaque.hash(state);
}
}
}
}

Expand Down

0 comments on commit 13bf355

Please sign in to comment.