Use Drop instead of destroy() for locks.
This commit is contained in:
@@ -26,7 +26,4 @@ impl Condvar {
|
||||
pub unsafe fn wait_timeout(&self, _mutex: &Mutex, _dur: Duration) -> bool {
|
||||
panic!("condvar wait not supported");
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn destroy(&self) {}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,4 @@ impl Mutex {
|
||||
pub unsafe fn try_lock(&self) -> bool {
|
||||
self.locked.replace(true) == false
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn destroy(&self) {}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,4 @@ impl RwLock {
|
||||
pub unsafe fn write_unlock(&self) {
|
||||
assert_eq!(self.mode.replace(0), -1);
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn destroy(&self) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user