Skip to content

Commit a670a4e

Browse files
committed
lints
1 parent 1b49188 commit a670a4e

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

examples/tracing-grpc/src/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ fn init_tracer() -> sdktrace::TracerProvider {
2222

2323
struct MetadataMap<'a>(&'a mut tonic::metadata::MetadataMap);
2424

25-
impl<'a> Injector for MetadataMap<'a> {
25+
impl Injector for MetadataMap<'_> {
2626
/// Set a key and value in the MetadataMap. Does nothing if the key or value are not valid inputs
2727
fn set(&mut self, key: &str, value: String) {
2828
if let Ok(key) = tonic::metadata::MetadataKey::from_bytes(key.as_bytes()) {

examples/tracing-grpc/src/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pub mod hello_world {
2929

3030
struct MetadataMap<'a>(&'a tonic::metadata::MetadataMap);
3131

32-
impl<'a> Extractor for MetadataMap<'a> {
32+
impl Extractor for MetadataMap<'_> {
3333
/// Get a value for a key from the MetadataMap. If the value can't be converted to &str, returns None
3434
fn get(&self, key: &str) -> Option<&str> {
3535
self.0.get(key).and_then(|metadata| metadata.to_str().ok())

opentelemetry-appender-log/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ mod any_value {
239239
pub(crate) fn serialize(value: log::kv::Value) -> Option<AnyValue> {
240240
struct ValueVisitor(Option<AnyValue>);
241241

242-
impl<'kvs> log::kv::VisitValue<'kvs> for ValueVisitor {
242+
impl log::kv::VisitValue<'_> for ValueVisitor {
243243
fn visit_any(&mut self, value: log::kv::Value) -> Result<(), log::kv::Error> {
244244
self.0 = Some(AnyValue::String(StringValue::from(value.to_string())));
245245

opentelemetry-stdout/src/trace/exporter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use chrono::{DateTime, Utc};
22
use core::fmt;
33
use futures_util::future::BoxFuture;
4-
use opentelemetry::trace::{TraceError, TraceResult};
4+
use opentelemetry::trace::{TraceError};
55
use opentelemetry_sdk::export::trace::ShutdownResult;
66
use opentelemetry_sdk::export::{self, trace::ExportResult};
77
use opentelemetry_sdk::resource::Resource;

stress/src/throughput.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ struct UnsafeSlice<'a> {
140140
slice: &'a [UnsafeCell<WorkerStats>],
141141
}
142142

143-
unsafe impl<'a> Send for UnsafeSlice<'a> {}
144-
unsafe impl<'a> Sync for UnsafeSlice<'a> {}
143+
unsafe impl Send for UnsafeSlice<'_> {}
144+
unsafe impl Sync for UnsafeSlice<'_> {}
145145

146146
impl<'a> UnsafeSlice<'a> {
147147
fn new(slice: &'a mut [WorkerStats]) -> Self {
@@ -155,7 +155,7 @@ impl<'a> UnsafeSlice<'a> {
155155
#[inline(always)]
156156
unsafe fn increment(&self, i: usize) {
157157
let value = self.slice[i].get();
158-
(*value).count = (*value).count + 1;
158+
(*value).count += 1;
159159
}
160160

161161
#[inline(always)]

0 commit comments

Comments
 (0)