Fix redundant boolean comparison in Mutex::try_lock

This commit is contained in:
🍌Shawn
2026-04-20 09:49:52 +08:00
committed by GitHub
parent e22c616e4e
commit e1059f6e53
+1 -1
View File
@@ -26,6 +26,6 @@ pub unsafe fn unlock(&self) {
#[inline]
pub fn try_lock(&self) -> bool {
self.locked.replace(true) == false
!self.locked.replace(true)
}
}