Skip to content

Commit f9b47f2

Browse files
committed
Fix lint
1 parent d22f97f commit f9b47f2

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

opentelemetry-jaeger/src/exporter/thrift/agent.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#![allow(unused_imports)]
55
#![allow(unused_extern_crates)]
6-
#![cfg_attr(clippy, allow(clippy::too_many_arguments, clippy::type_complexity))]
6+
#![allow(clippy::too_many_arguments, clippy::type_complexity)]
77
#![cfg_attr(rustfmt, rustfmt_skip)]
88

99
extern crate thrift;

opentelemetry-jaeger/src/exporter/thrift/jaeger.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#![allow(unused_imports)]
55
#![allow(unused_extern_crates)]
6-
#![cfg_attr(clippy, allow(clippy::too_many_arguments, clippy::type_complexity))]
6+
#![allow(clippy::too_many_arguments, clippy::type_complexity)]
77
#![cfg_attr(rustfmt, rustfmt_skip)]
88

99
extern crate thrift;

opentelemetry-jaeger/src/exporter/thrift/zipkincore.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#![allow(unused_imports)]
55
#![allow(unused_extern_crates)]
6-
#![cfg_attr(clippy, allow(clippy::too_many_arguments, clippy::type_complexity))]
6+
#![allow(clippy::too_many_arguments, clippy::type_complexity)]
77
#![cfg_attr(rustfmt, rustfmt_skip)]
88

99
extern crate thrift;

opentelemetry-otlp/examples/basic-otlp-http/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ static COMMON_ATTRIBUTES: Lazy<[KeyValue; 4]> = Lazy::new(|| {
7474

7575
#[tokio::main]
7676
async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
77-
let _ = init_tracer()?;
78-
let _ = init_metrics()?;
77+
init_tracer()?;
78+
init_metrics()?;
7979
// Opentelemetry will not provide a global API to manage the logger provider. Application users must manage the lifecycle of the logger provider on their own. Dropping logger providers will disable log emitting.
8080
let logger_provider = init_logs().unwrap();
8181

opentelemetry-otlp/examples/basic-otlp/src/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
8989
// By binding the result to an unused variable, the lifetime of the variable
9090
// matches the containing block, reporting traces and metrics during the whole
9191
// execution.
92-
let _ = init_tracer()?;
93-
let _ = init_metrics()?;
92+
init_tracer()?;
93+
init_metrics()?;
9494

9595
// Initialize logs, which sets the global loggerprovider.
9696
let logger_provider = init_logs().unwrap();

opentelemetry-sdk/src/metrics/periodic_reader.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use futures_util::{
99
future::{self, Either},
1010
pin_mut,
1111
stream::{self, FusedStream},
12-
Stream, StreamExt,
12+
StreamExt,
1313
};
1414
use opentelemetry::{
1515
global,
@@ -290,7 +290,7 @@ impl<RT: Runtime> PeriodicReaderWorker<RT> {
290290
true
291291
}
292292

293-
async fn run(mut self, mut messages: impl Stream<Item = Message> + Unpin + FusedStream) {
293+
async fn run(mut self, mut messages: impl Unpin + FusedStream<Item = Message>) {
294294
while let Some(message) = messages.next().await {
295295
if !self.process_message(message).await {
296296
break;

opentelemetry-sdk/src/metrics/pipeline.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ impl SdkProducer for Pipeline {
165165
// previous aggregation was of a different type
166166
prev_agg.data = data;
167167
}
168-
prev_agg.name = inst.name.clone();
169-
prev_agg.description = inst.description.clone();
170-
prev_agg.unit = inst.unit.clone();
168+
prev_agg.name.clone_from(&inst.name);
169+
prev_agg.description.clone_from(&inst.description);
170+
prev_agg.unit.clone_from(&inst.unit);
171171
}
172172
_ => continue,
173173
}

0 commit comments

Comments
 (0)