Skip to content

Commit

Permalink
Fix CI lint errors from new stable toolchain v1.83 (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
garysassano authored Dec 11, 2024
1 parent 0c3771a commit 7e1c53a
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions opentelemetry-contrib/benches/new_span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use opentelemetry_contrib::trace::{
};
use opentelemetry_sdk::{
export::trace::{ExportResult, SpanData, SpanExporter},
trace::{Config, Sampler, TracerProvider},
trace::{Sampler, TracerProvider},
};
#[cfg(not(target_os = "windows"))]
use pprof::criterion::{Output, PProfProfiler};
Expand Down Expand Up @@ -152,7 +152,7 @@ impl Display for Environment {

fn parent_sampled_tracer(inner_sampler: Sampler) -> (TracerProvider, BoxedTracer) {
let provider = TracerProvider::builder()
.with_config(Config::default().with_sampler(Sampler::ParentBased(Box::new(inner_sampler))))
.with_sampler(Sampler::ParentBased(Box::new(inner_sampler)))
.with_simple_exporter(NoopExporter)
.build();
let tracer = provider.tracer(module_path!());
Expand Down
1 change: 0 additions & 1 deletion opentelemetry-contrib/src/trace/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ pub fn new_span_if_recording(
/// ```
/// use opentelemetry::trace::{SpanBuilder, TraceContextExt as _};
/// use opentelemetry_contrib::trace::{new_span_if_parent_sampled, Contextualized, TracerSource};
/// enum Message{Command};
/// let (tx, rx) = std::sync::mpsc::channel();
///
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-contrib/src/trace/tracer_source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl<'a> TracerSource<'a> {
}
}

impl<'a> Debug for Variant<'a> {
impl Debug for Variant<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
use Variant::*;
match self {
Expand Down
1 change: 1 addition & 0 deletions opentelemetry-datadog/examples/agent_sampling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ impl ShouldSample for AgentBasedSampler {
}

fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
#[allow(deprecated)]
let tracer = new_pipeline()
.with_service_name("agent-sampling-demo")
.with_api_version(ApiVersion::Version05)
Expand Down
6 changes: 3 additions & 3 deletions opentelemetry-datadog/src/exporter/intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub(crate) enum InternValue<'a> {
OpenTelemetryValue(&'a Value),
}

impl<'a> Hash for InternValue<'a> {
impl Hash for InternValue<'_> {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
match &self {
InternValue::RegularString(s) => s.hash(state),
Expand All @@ -44,7 +44,7 @@ impl<'a> Hash for InternValue<'a> {
}
}

impl<'a> Eq for InternValue<'a> {}
impl Eq for InternValue<'_> {}

const BOOLEAN_TRUE: &str = "true";
const BOOLEAN_FALSE: &str = "false";
Expand Down Expand Up @@ -84,7 +84,7 @@ impl WriteAsLiteral for StringValue {
}
}

impl<'a> InternValue<'a> {
impl InternValue<'_> {
pub(crate) fn write_as_str<W: RmpWrite>(
&self,
payload: &mut W,
Expand Down
4 changes: 2 additions & 2 deletions opentelemetry-datadog/src/exporter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ impl DatadogPipelineBuilder {
let (config, service_name) = self.build_config_and_service_name();
let exporter = self.build_exporter_with_service_name(service_name)?;
let mut provider_builder = TracerProvider::builder().with_simple_exporter(exporter);
provider_builder = provider_builder.with_config(config);
provider_builder = provider_builder.with_resource(config.resource.into_owned());
let provider = provider_builder.build();
let scope = InstrumentationScope::builder("opentelemetry-datadog")
.with_version(env!("CARGO_PKG_VERSION"))
Expand All @@ -305,7 +305,7 @@ impl DatadogPipelineBuilder {
let (config, service_name) = self.build_config_and_service_name();
let exporter = self.build_exporter_with_service_name(service_name)?;
let mut provider_builder = TracerProvider::builder().with_batch_exporter(exporter, runtime);
provider_builder = provider_builder.with_config(config);
provider_builder = provider_builder.with_resource(config.resource.into_owned());
let provider = provider_builder.build();
let scope = InstrumentationScope::builder("opentelemetry-datadog")
.with_version(env!("CARGO_PKG_VERSION"))
Expand Down
1 change: 0 additions & 1 deletion opentelemetry-datadog/src/exporter/model/unified_tags.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/// Unified tags - See: https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging
pub struct UnifiedTags {
pub service: UnifiedTagField,
pub env: UnifiedTagField,
Expand Down

0 comments on commit 7e1c53a

Please sign in to comment.