File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ where
147147{
148148 // Escape hatch for unit tests
149149 if stdext:: IS_TESTING {
150- let _lock = unsafe { harp:: fixtures:: R_TEST_LOCK . lock ( ) } ;
150+ let _lock = harp:: fixtures:: R_TEST_LOCK . lock ( ) ;
151151 r_test_init ( ) ;
152152 return f ( ) ;
153153 }
@@ -255,7 +255,7 @@ where
255255{
256256 // Escape hatch for unit tests
257257 if stdext:: IS_TESTING {
258- let _lock = unsafe { harp:: fixtures:: R_TEST_LOCK . lock ( ) } ;
258+ let _lock = harp:: fixtures:: R_TEST_LOCK . lock ( ) ;
259259 futures:: executor:: block_on ( fun ( ) ) ;
260260 return ;
261261 }
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ use crate::R_MAIN_THREAD_ID;
2323
2424// FIXME: Needs to be a reentrant lock for idle tasks. We can probably do better
2525// though.
26- pub static mut R_TEST_LOCK : parking_lot:: ReentrantMutex < ( ) > = parking_lot:: ReentrantMutex :: new ( ( ) ) ;
26+ pub static R_TEST_LOCK : parking_lot:: ReentrantMutex < ( ) > = parking_lot:: ReentrantMutex :: new ( ( ) ) ;
2727
2828static INIT : Once = Once :: new ( ) ;
2929
@@ -35,7 +35,7 @@ static INIT: Once = Once::new();
3535/// `ark::r_task()` in Ark tests so that Ark initialisation also takes place.
3636#[ cfg( test) ]
3737pub ( crate ) fn r_task < F : FnOnce ( ) > ( f : F ) {
38- let guard = unsafe { R_TEST_LOCK . lock ( ) } ;
38+ let guard = R_TEST_LOCK . lock ( ) ;
3939
4040 r_test_init ( ) ;
4141 f ( ) ;
You can’t perform that action at this time.
0 commit comments