Skip to content

Commit 0921962

Browse files
committed
chore: fix new clippy lints
1 parent e643a42 commit 0921962

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/layer.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -974,15 +974,10 @@ where
974974
fn start_cx(&self, otel_data: &mut OtelData) {
975975
if let OtelDataState::Context { .. } = &otel_data.state {
976976
// 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 };
986981
}
987982
}
988983

0 commit comments

Comments
 (0)