Use Drop instead of destroy() for locks.

This commit is contained in:
Mara Bos
2022-06-03 16:45:47 +02:00
parent fb1976011e
commit ac5aa1ded5
24 changed files with 39 additions and 87 deletions

View File

@@ -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) {}
}

View File

@@ -32,7 +32,4 @@ impl Mutex {
pub unsafe fn try_lock(&self) -> bool {
self.locked.replace(true) == false
}
#[inline]
pub unsafe fn destroy(&self) {}
}

View File

@@ -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) {}
}