Skip to content

Commit

Permalink
Add must_use attributes to the Uninstall structs
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed Dec 1, 2020
1 parent 283e0b5 commit 941f6e7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions opentelemetry-contrib/src/trace/exporter/datadog/mod.rs
Expand Up @@ -290,5 +290,6 @@ impl trace::SpanExporter for DatadogExporter {
}

/// Uninstalls the Datadog pipeline on drop
#[must_use]
#[derive(Debug)]
pub struct Uninstall(global::TracerProviderGuard);
1 change: 1 addition & 0 deletions opentelemetry-jaeger/src/lib.rs
Expand Up @@ -225,6 +225,7 @@ pub fn new_pipeline() -> PipelineBuilder {
}

/// Guard that uninstalls the Jaeger trace pipeline when dropped
#[must_use]
#[derive(Debug)]
pub struct Uninstall(global::TracerProviderGuard);

Expand Down
1 change: 1 addition & 0 deletions opentelemetry-otlp/src/lib.rs
Expand Up @@ -233,5 +233,6 @@ impl OtlpPipelineBuilder {
}

/// Uninstalls the OTLP pipeline on drop
#[must_use]
#[derive(Debug)]
pub struct Uninstall(global::TracerProviderGuard);
1 change: 1 addition & 0 deletions opentelemetry-zipkin/src/lib.rs
Expand Up @@ -320,5 +320,6 @@ impl trace::SpanExporter for Exporter {
}

/// Uninstalls the Zipkin pipeline on drop.
#[must_use]
#[derive(Debug)]
pub struct Uninstall(global::TracerProviderGuard);
1 change: 1 addition & 0 deletions opentelemetry/src/exporter/trace/stdout.rs
Expand Up @@ -141,5 +141,6 @@ where
}

/// Uninstalls the stdout pipeline on drop.
#[must_use]
#[derive(Debug)]
pub struct Uninstall(global::TracerProviderGuard);

0 comments on commit 941f6e7

Please sign in to comment.