File tree 1 file changed +16
-16
lines changed
1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -60,14 +60,15 @@ impl fmt::Debug for Client {
60
60
impl Clone for Client {
61
61
fn clone ( & self ) -> Client {
62
62
let transport = Arc :: new ( RwLock :: new ( self . transport . read ( ) . unwrap ( ) . clone ( ) ) ) ;
63
- let session_flusher = if cfg ! ( feature = "release-health" ) {
64
- RwLock :: new ( Some ( SessionFlusher :: new (
65
- transport. clone ( ) ,
66
- self . options . session_mode ,
67
- ) ) )
68
- } else {
69
- RwLock :: new ( None )
70
- } ;
63
+
64
+ #[ cfg( feature = "release-health" ) ]
65
+ let session_flusher = RwLock :: new ( Some ( SessionFlusher :: new (
66
+ transport. clone ( ) ,
67
+ self . options . session_mode ,
68
+ ) ) ) ;
69
+ #[ cfg( not( feature = "release-health" ) ) ]
70
+ let session_flusher = RwLock :: new ( None ) ;
71
+
71
72
Client {
72
73
options : self . options . clone ( ) ,
73
74
transport,
@@ -135,14 +136,13 @@ impl Client {
135
136
sdk_info. integrations . push ( integration. name ( ) . to_string ( ) ) ;
136
137
}
137
138
138
- let session_flusher = if cfg ! ( feature = "release-health" ) {
139
- RwLock :: new ( Some ( SessionFlusher :: new (
140
- transport. clone ( ) ,
141
- options. session_mode ,
142
- ) ) )
143
- } else {
144
- RwLock :: new ( None )
145
- } ;
139
+ #[ cfg( feature = "release-health" ) ]
140
+ let session_flusher = RwLock :: new ( Some ( SessionFlusher :: new (
141
+ transport. clone ( ) ,
142
+ options. session_mode ,
143
+ ) ) ) ;
144
+ #[ cfg( not( feature = "release-health" ) ) ]
145
+ let session_flusher = RwLock :: new ( None ) ;
146
146
147
147
Client {
148
148
options,
You can’t perform that action at this time.
0 commit comments