@@ -9,11 +9,11 @@ use parking_lot::RwLock;
99use rand:: { self , Rng } ;
1010use std:: borrow:: Cow ;
1111use std:: error:: Error ;
12- use std:: sync:: { Arc , LazyLock } ;
12+ use std:: sync:: Arc ;
1313
1414pub ( crate ) type Tracer = cf_rustracing:: Tracer < BoxSampler < SpanContextState > , SpanContextState > ;
1515
16- static INACTIVE_SPAN : LazyLock < RwLock < Span > > = LazyLock :: new ( || RwLock :: new ( Span :: inactive ( ) ) ) ;
16+ static INACTIVE_SPAN : RwLock < Span > = RwLock :: new ( Span :: inactive ( ) ) ;
1717
1818/// Shared span with mutability and additional reference tracking for
1919/// ad-hoc inspection.
@@ -33,15 +33,15 @@ impl SharedSpanHandle {
3333 match self {
3434 SharedSpanHandle :: Tracked ( handle) => handle. read ( ) ,
3535 SharedSpanHandle :: Untracked ( rw_lock) => rw_lock. read ( ) ,
36- SharedSpanHandle :: Inactive => ( * INACTIVE_SPAN ) . read ( ) ,
36+ SharedSpanHandle :: Inactive => INACTIVE_SPAN . read ( ) ,
3737 }
3838 }
3939
4040 pub ( crate ) fn write ( & self ) -> parking_lot:: RwLockWriteGuard < ' _ , Span > {
4141 match self {
4242 SharedSpanHandle :: Tracked ( handle) => handle. write ( ) ,
4343 SharedSpanHandle :: Untracked ( rw_lock) => rw_lock. write ( ) ,
44- SharedSpanHandle :: Inactive => ( * INACTIVE_SPAN ) . write ( ) ,
44+ SharedSpanHandle :: Inactive => INACTIVE_SPAN . write ( ) ,
4545 }
4646 }
4747}
@@ -50,7 +50,7 @@ impl From<SharedSpanHandle> for Arc<RwLock<Span>> {
5050 fn from ( value : SharedSpanHandle ) -> Self {
5151 match value {
5252 SharedSpanHandle :: Tracked ( handle) => Arc :: clone ( & handle) ,
53- SharedSpanHandle :: Untracked ( rw_lock) => Arc :: clone ( & rw_lock) ,
53+ SharedSpanHandle :: Untracked ( rw_lock) => rw_lock,
5454 SharedSpanHandle :: Inactive => Arc :: new ( RwLock :: new ( Span :: inactive ( ) ) ) ,
5555 }
5656 }
0 commit comments