Fix bug for downgrading cell locks

This commit is contained in:
Noah committed 2021-03-14 12:49:59 -05:00
1 parent 57540ad2e1
commit bdc01f0370
1 file changed
+2 -2
+2 -2
View File
@@ -121,7 +121,7 @@ unsafe impl RawRwLock for RawCellRwLock {
unsafe impl RawRwLockDowngrade for RawCellRwLock {
unsafe fn downgrade(&self) {
// no-op -- we're always exclusively locked for this thread
self.state.set(ONE_READER);
}
}
@@ -170,7 +170,7 @@ unsafe impl RawRwLockUpgradeDowngrade for RawCellRwLock {
#[inline]
unsafe fn downgrade_to_upgradable(&self) {
// no-op -- we're always exclusively locked for this thread
self.state.set(ONE_READER);
}
}