mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
Fix redundant boolean comparison in Mutex::try_lock
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user