Skip to content

Commit

Permalink
promot debug_assert to assert
Browse files Browse the repository at this point in the history
  • Loading branch information
kckeiks committed Mar 7, 2022
1 parent ecb867e commit 776be7e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions library/std/src/sys/unix/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ impl RWLock {
}
panic!("rwlock read lock would result in deadlock");
} else {
// According to POSIX, for a properly initialized rwlock this can only
// return EAGAIN or EDEADLK or 0. We rely on that.
debug_assert_eq!(r, 0);
// POSIX does not make guarantees about all the errors that may be returned.
// See issue #94705 for more details.
assert_eq!(r, 0, "unexpected error during rwlock read lock: {:?}", r);
self.num_readers.fetch_add(1, Ordering::Relaxed);
}
}
Expand Down

0 comments on commit 776be7e

Please sign in to comment.