From 36a77db305769cd4f4d6ff49eb03e870bde4cb88 Mon Sep 17 00:00:00 2001 From: Laurence Tratt Date: Mon, 21 Dec 2020 18:45:40 +0000 Subject: [PATCH] Simplify debug_asserts. --- core/src/thread_parker/unix.rs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/core/src/thread_parker/unix.rs b/core/src/thread_parker/unix.rs index a58e6ffe..c2381e6d 100644 --- a/core/src/thread_parker/unix.rs +++ b/core/src/thread_parker/unix.rs @@ -156,17 +156,9 @@ impl Drop for ThreadParker { // this behaviour no longer occurs. The same applies to condvars. unsafe { let r = libc::pthread_mutex_destroy(self.mutex.get()); - if cfg!(target_os = "dragonfly") { - debug_assert!(r == 0 || r == libc::EINVAL); - } else { - debug_assert_eq!(r, 0); - } + debug_assert!(r == 0 || r == libc::EINVAL); let r = libc::pthread_cond_destroy(self.condvar.get()); - if cfg!(target_os = "dragonfly") { - debug_assert!(r == 0 || r == libc::EINVAL); - } else { - debug_assert_eq!(r, 0); - } + debug_assert!(r == 0 || r == libc::EINVAL); } } }