1
Fork 0

Fix formatting

This commit is contained in:
Austin Kiekintveld 2022-05-01 19:02:28 -07:00
parent df4457e20b
commit a05df2ea19

View file

@ -24,8 +24,12 @@ impl SameMutexCheck {
}
pub fn verify(&self, mutex: &MovableMutex) {
let addr = mutex.raw() as *const imp::Mutex as *const () as *mut _;
match self.addr.compare_exchange(ptr::null_mut(), addr, Ordering::Relaxed, Ordering::Relaxed)
{
match self.addr.compare_exchange(
ptr::null_mut(),
addr,
Ordering::Relaxed,
Ordering::Relaxed,
) {
Ok(_) => {} // Stored the address
Err(n) if n == addr => {} // Lost a race to store the same address
_ => panic!("attempted to use a condition variable with two mutexes"),