Skip to content

Commit f1c3edb

Browse files
m-ou-seJoshua Nelson
and
Joshua Nelson
authored
Assert state in sys/unsupported's RwLock::write_unlock.
Co-authored-by: Joshua Nelson <[email protected]>
1 parent f4e8842 commit f1c3edb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/unsupported/rwlock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl RWLock {
5757

5858
#[inline]
5959
pub unsafe fn write_unlock(&self) {
60-
self.mode.set(0);
60+
assert_eq!(self.mode.replace(0), -1);
6161
}
6262

6363
#[inline]

0 commit comments

Comments
 (0)