From 0cc1e601d9df3665911c328e9805058d652327a4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 11:57:27 +0100 Subject: [PATCH] chore(deps): update dependency rust to v1.83.0 (#83) * chore(deps): update dependency rust to v1.83.0 * Fix clippy warnings --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Leonid Beschastny --- rust-toolchain | 2 +- src/http.rs | 4 ++-- src/lib.rs | 4 ---- src/middleware/aws/operations/dynamodb.rs | 2 +- src/middleware/aws/operations/firehose.rs | 2 +- src/middleware/aws/operations/sns.rs | 2 +- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/rust-toolchain b/rust-toolchain index 71fae54..6b4de0a 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.82.0 +1.83.0 diff --git a/src/http.rs b/src/http.rs index 509d3fe..f46a067 100644 --- a/src/http.rs +++ b/src/http.rs @@ -9,7 +9,7 @@ use tracing_opentelemetry_instrumentation_sdk as otel; // copy from crate opentelemetry-http (to not be dependants of on 3rd: http, ...) pub struct HeaderInjector<'a>(pub &'a mut http::HeaderMap); -impl<'a> Injector for HeaderInjector<'a> { +impl Injector for HeaderInjector<'_> { /// Set a key and value in the `HeaderMap`. Does nothing if the key or value are not valid inputs. fn set(&mut self, key: &str, value: String) { if let Ok(name) = http::header::HeaderName::from_bytes(key.as_bytes()) { @@ -22,7 +22,7 @@ impl<'a> Injector for HeaderInjector<'a> { pub struct HeaderExtractor<'a>(pub &'a http::HeaderMap); -impl<'a> Extractor for HeaderExtractor<'a> { +impl Extractor for HeaderExtractor<'_> { /// Get a value for a key from the `HeaderMap`. If the value is not valid ASCII, returns None. fn get(&self, key: &str) -> Option<&str> { self.0.get(key).and_then(|value| value.to_str().ok()) diff --git a/src/lib.rs b/src/lib.rs index 478af57..6698953 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,10 +44,6 @@ impl DetectResource { /// `service.name` is first extracted from environment variables /// (in this order) `OTEL_SERVICE_NAME`, `SERVICE_NAME`, `APP_NAME`. /// But a default value can be provided with this method. - - /// `service.name` is first extracted from environment variables - /// (in this order) `SERVICE_VERSION`, `APP_VERSION`. - /// But a default value can be provided with this method. pub fn new( fallback_service_name: &'static str, fallback_service_version: &'static str, diff --git a/src/middleware/aws/operations/dynamodb.rs b/src/middleware/aws/operations/dynamodb.rs index 700a344..490d947 100644 --- a/src/middleware/aws/operations/dynamodb.rs +++ b/src/middleware/aws/operations/dynamodb.rs @@ -7,7 +7,7 @@ pub const LEGACY_DB_NAME: &str = semconv::DB_NAME; pub enum DynamodbSpanBuilder {} -impl<'a> AwsSpanBuilder<'a> { +impl AwsSpanBuilder<'_> { pub fn dynamodb( method: impl Into, table_names: impl IntoIterator>, diff --git a/src/middleware/aws/operations/firehose.rs b/src/middleware/aws/operations/firehose.rs index e313b73..d287f0d 100644 --- a/src/middleware/aws/operations/firehose.rs +++ b/src/middleware/aws/operations/firehose.rs @@ -4,7 +4,7 @@ use super::*; pub enum FirehoseSpanBuilder {} -impl<'a> AwsSpanBuilder<'a> { +impl AwsSpanBuilder<'_> { pub fn firehose( operation_kind: MessagingOperationKind, method: impl Into, diff --git a/src/middleware/aws/operations/sns.rs b/src/middleware/aws/operations/sns.rs index 8d9a2da..2994542 100644 --- a/src/middleware/aws/operations/sns.rs +++ b/src/middleware/aws/operations/sns.rs @@ -4,7 +4,7 @@ use super::*; pub enum SnsSpanBuilder {} -impl<'a> AwsSpanBuilder<'a> { +impl AwsSpanBuilder<'_> { pub fn sns( operation_kind: MessagingOperationKind, method: impl Into,