Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
andylokandy committed Jul 3, 2024
1 parent cecbdc3 commit a8d7eb2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions minitrace/src/span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,9 @@ impl Drop for LocalParentGuard {
let (spans, token) = inner.collector.collect_spans_and_token();
debug_assert!(token.is_some());
if let Some(token) = token {
if !spans.spans.is_empty() {
inner
.collect
.submit_spans(SpanSet::LocalSpansInner(spans), token);
}
inner
.collect
.submit_spans(SpanSet::LocalSpansInner(spans), token);
}
}
}
Expand Down

0 comments on commit a8d7eb2

Please sign in to comment.