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

@ -51,8 +51,4 @@ impl Condvar {
pub unsafe fn notify_all(&self) {
c::WakeAllConditionVariable(self.inner.get())
}
pub unsafe fn destroy(&self) {
// ...
}
}

View file

@ -53,9 +53,4 @@ impl Mutex {
pub unsafe fn unlock(&self) {
c::ReleaseSRWLockExclusive(raw(self));
}
#[inline]
pub unsafe fn destroy(&self) {
// SRWLock does not need to be destroyed.
}
}

View file

@ -38,9 +38,4 @@ impl RwLock {
pub unsafe fn write_unlock(&self) {
c::ReleaseSRWLockExclusive(self.inner.get())
}
#[inline]
pub unsafe fn destroy(&self) {
// ...
}
}