File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
library/std/src/sys/windows Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,8 @@ impl Mutex {
135135 n => return n as * const _ ,
136136 }
137137 unsafe {
138- let inner = box Inner { remutex : ReentrantMutex :: uninitialized ( ) , held : Cell :: new ( false ) } ;
138+ let inner =
139+ box Inner { remutex : ReentrantMutex :: uninitialized ( ) , held : Cell :: new ( false ) } ;
139140 inner. remutex . init ( ) ;
140141 let inner = Box :: into_raw ( inner) ;
141142 match self . lock . compare_and_swap ( 0 , inner as usize , Ordering :: SeqCst ) {
@@ -182,9 +183,7 @@ impl ReentrantMutex {
182183 #[ inline]
183184 pub unsafe fn try_lock ( & self ) -> bool {
184185 // SAFETY: The caller must ensure that the mutex is not moved or copied
185- unsafe {
186- c:: TryEnterCriticalSection ( UnsafeCell :: raw_get ( self . inner . as_ptr ( ) ) ) != 0
187- }
186+ unsafe { c:: TryEnterCriticalSection ( UnsafeCell :: raw_get ( self . inner . as_ptr ( ) ) ) != 0 }
188187 }
189188
190189 pub unsafe fn unlock ( & self ) {
You can’t perform that action at this time.
0 commit comments