@@ -31,24 +31,35 @@ mod test_lockorder_checks;
3131#[ cfg( all( feature = "std" , any( ldk_bench, not( test) ) ) ) ]
3232pub ( crate ) mod fairrwlock;
3333#[ cfg( all( feature = "std" , any( ldk_bench, not( test) ) ) ) ]
34- pub use { std:: sync:: { Arc , Mutex , Condvar , MutexGuard , RwLock , RwLockReadGuard , RwLockWriteGuard } , fairrwlock:: FairRwLock } ;
34+ pub use {
35+ fairrwlock:: FairRwLock ,
36+ std:: sync:: { Arc , Condvar , Mutex , MutexGuard , RwLock , RwLockReadGuard , RwLockWriteGuard } ,
37+ } ;
3538
3639#[ cfg( all( feature = "std" , any( ldk_bench, not( test) ) ) ) ]
3740mod ext_impl {
3841 use super :: * ;
3942 impl < ' a , T : ' a > LockTestExt < ' a > for Mutex < T > {
4043 #[ inline]
41- fn held_by_thread ( & self ) -> LockHeldState { LockHeldState :: Unsupported }
44+ fn held_by_thread ( & self ) -> LockHeldState {
45+ LockHeldState :: Unsupported
46+ }
4247 type ExclLock = MutexGuard < ' a , T > ;
4348 #[ inline]
44- fn unsafe_well_ordered_double_lock_self ( & ' a self ) -> MutexGuard < T > { self . lock ( ) . unwrap ( ) }
49+ fn unsafe_well_ordered_double_lock_self ( & ' a self ) -> MutexGuard < T > {
50+ self . lock ( ) . unwrap ( )
51+ }
4552 }
4653 impl < ' a , T : ' a > LockTestExt < ' a > for RwLock < T > {
4754 #[ inline]
48- fn held_by_thread ( & self ) -> LockHeldState { LockHeldState :: Unsupported }
55+ fn held_by_thread ( & self ) -> LockHeldState {
56+ LockHeldState :: Unsupported
57+ }
4958 type ExclLock = RwLockWriteGuard < ' a , T > ;
5059 #[ inline]
51- fn unsafe_well_ordered_double_lock_self ( & ' a self ) -> RwLockWriteGuard < T > { self . write ( ) . unwrap ( ) }
60+ fn unsafe_well_ordered_double_lock_self ( & ' a self ) -> RwLockWriteGuard < T > {
61+ self . write ( ) . unwrap ( )
62+ }
5263 }
5364}
5465
0 commit comments