File tree Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Expand file tree Collapse file tree 1 file changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -410,21 +410,16 @@ where
410
410
where
411
411
S : Subscriber + for < ' span > LookupSpan < ' span > ,
412
412
{
413
- match ctx. span ( id) {
414
- // if the event is in a span, get the span's starting point.
415
- Some ( ctx) => {
416
- let ext = ctx. extensions ( ) ;
417
- let data = ext
418
- . get :: < Data > ( )
419
- . expect ( "Data cannot be found in extensions" ) ;
420
-
421
- if self . config . higher_precision {
422
- Some ( self . format_timestamp_with_decimals ( data. start ) )
423
- } else {
424
- Some ( self . format_timestamp ( data. start ) )
425
- }
426
- }
427
- None => None ,
413
+ let ctx = ctx. span ( id) ?;
414
+ let ext = ctx. extensions ( ) ;
415
+ let data = ext
416
+ . get :: < Data > ( )
417
+ . expect ( "Data cannot be found in extensions" ) ;
418
+
419
+ if self . config . higher_precision {
420
+ Some ( self . format_timestamp_with_decimals ( data. start ) )
421
+ } else {
422
+ Some ( self . format_timestamp ( data. start ) )
428
423
}
429
424
}
430
425
You can’t perform that action at this time.
0 commit comments