Skip to content

Commit d365eba

Browse files
authored
do not exit the loop if no context is found (#616)
1 parent 1e08abd commit d365eba

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

bottlecap/src/lifecycle/invocation/triggers/step_function_event.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ mod tests {
454454
}
455455

456456
#[test]
457+
#[allow(clippy::too_many_lines)]
457458
fn test_get_span_context() {
458459
let test_cases = vec![
459460
(

bottlecap/src/traces/propagation/mod.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,18 @@ pub struct DatadogCompositePropagator {
2525
config: Arc<config::Config>,
2626
}
2727

28-
#[allow(clippy::never_loop)]
2928
impl Propagator for DatadogCompositePropagator {
3029
fn extract(&self, carrier: &dyn Extractor) -> Option<SpanContext> {
3130
if self.config.trace_propagation_extract_first {
3231
for propagator in &self.propagators {
3332
let context = propagator.extract(carrier);
3433

35-
if self.config.trace_propagation_http_baggage_enabled {
36-
if let Some(mut context) = context {
34+
if let Some(mut context) = context {
35+
if self.config.trace_propagation_http_baggage_enabled {
3736
Self::attach_baggage(&mut context, carrier);
38-
return Some(context);
3937
}
38+
return Some(context);
4039
}
41-
42-
return context;
4340
}
4441
}
4542

0 commit comments

Comments
 (0)