@@ -173,26 +173,26 @@ impl ReentrantMutex {
173173
174174 pub unsafe fn lock ( & self ) {
175175 // `init` must have been called, so this is now initialized and
176- // we can call `get_ref `.
177- c:: EnterCriticalSection ( ( & mut * self . inner . get ( ) ) . get_ref ( ) ) ;
176+ // we can call `get_mut `.
177+ c:: EnterCriticalSection ( ( & mut * self . inner . get ( ) ) . get_mut ( ) ) ;
178178 }
179179
180180 #[ inline]
181181 pub unsafe fn try_lock ( & self ) -> bool {
182182 // `init` must have been called, so this is now initialized and
183- // we can call `get_ref `.
184- c:: TryEnterCriticalSection ( ( & mut * self . inner . get ( ) ) . get_ref ( ) ) != 0
183+ // we can call `get_mut `.
184+ c:: TryEnterCriticalSection ( ( & mut * self . inner . get ( ) ) . get_mut ( ) ) != 0
185185 }
186186
187187 pub unsafe fn unlock ( & self ) {
188188 // `init` must have been called, so this is now initialized and
189- // we can call `get_ref `.
190- c:: LeaveCriticalSection ( ( & mut * self . inner . get ( ) ) . get_ref ( ) ) ;
189+ // we can call `get_mut `.
190+ c:: LeaveCriticalSection ( ( & mut * self . inner . get ( ) ) . get_mut ( ) ) ;
191191 }
192192
193193 pub unsafe fn destroy ( & self ) {
194194 // `init` must have been called, so this is now initialized and
195- // we can call `get_ref `.
196- c:: DeleteCriticalSection ( ( & mut * self . inner . get ( ) ) . get_ref ( ) ) ;
195+ // we can call `get_mut `.
196+ c:: DeleteCriticalSection ( ( & mut * self . inner . get ( ) ) . get_mut ( ) ) ;
197197 }
198198}
0 commit comments