File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -974,15 +974,10 @@ where
974
974
fn start_cx ( & self , otel_data : & mut OtelData ) {
975
975
if let OtelDataState :: Context { .. } = & otel_data. state {
976
976
// If the context is already started, we do nothing.
977
- } else {
978
- match take ( & mut otel_data. state ) {
979
- OtelDataState :: Builder { builder, parent_cx } => {
980
- let span = builder. start_with_context ( & self . tracer , & parent_cx) ;
981
- let current_cx = parent_cx. with_span ( span) ;
982
- otel_data. state = OtelDataState :: Context { current_cx } ;
983
- }
984
- _ => ( ) , // This should never happen.
985
- }
977
+ } else if let OtelDataState :: Builder { builder, parent_cx } = take ( & mut otel_data. state ) {
978
+ let span = builder. start_with_context ( & self . tracer , & parent_cx) ;
979
+ let current_cx = parent_cx. with_span ( span) ;
980
+ otel_data. state = OtelDataState :: Context { current_cx } ;
986
981
}
987
982
}
988
983
You can’t perform that action at this time.
0 commit comments