diff --git a/examples/self-diagnostics/src/main.rs b/examples/self-diagnostics/src/main.rs index 04cd1fcd45..b9e6ebd490 100644 --- a/examples/self-diagnostics/src/main.rs +++ b/examples/self-diagnostics/src/main.rs @@ -12,7 +12,6 @@ use once_cell::sync::Lazy; use std::collections::HashSet; use std::sync::{Arc, Mutex}; -use ctrlc; use std::sync::mpsc::channel; struct ErrorState { diff --git a/opentelemetry-sdk/src/metrics/view.rs b/opentelemetry-sdk/src/metrics/view.rs index 8184613589..d9f256bd2b 100644 --- a/opentelemetry-sdk/src/metrics/view.rs +++ b/opentelemetry-sdk/src/metrics/view.rs @@ -107,7 +107,7 @@ pub fn new_view(criteria: Instrument, mask: Stream) -> Result> { ))); return Ok(Box::new(empty_view)); } - let contains_wildcard = criteria.name.contains(|c| c == '*' || c == '?'); + let contains_wildcard = criteria.name.contains(['*', '?']); let err_msg_criteria = criteria.clone(); let match_fn: Box bool + Send + Sync> = if contains_wildcard { diff --git a/opentelemetry-zipkin/src/exporter/model/mod.rs b/opentelemetry-zipkin/src/exporter/model/mod.rs index 67f3a73767..b143848f31 100644 --- a/opentelemetry-zipkin/src/exporter/model/mod.rs +++ b/opentelemetry-zipkin/src/exporter/model/mod.rs @@ -37,11 +37,10 @@ pub(crate) fn into_zipkin_span(local_endpoint: Endpoint, span_data: SpanData) -> span_data .attributes .into_iter() - .map(|kv| { + .inspect(|kv| { if kv.key == Key::new("span.kind") { user_defined_span_kind = true; } - kv }) .chain( [ diff --git a/scripts/patch_dependencies.sh b/scripts/patch_dependencies.sh index f130267fde..e1e040be90 100755 --- a/scripts/patch_dependencies.sh +++ b/scripts/patch_dependencies.sh @@ -10,3 +10,5 @@ patch_version cc 1.0.105 patch_version url 2.5.0 patch_version hyper-rustls 0.27.2 # 0.27.3 needs rustc v1.70.0 patch_version tokio-util 0.7.11 # 0.7.12 needs rustc v1.70.0 +patch_version tokio-stream 0.1.15 # 0.1.16 needs rustc v1.70.0 + diff --git a/stress/src/throughput.rs b/stress/src/throughput.rs index 41d790eea4..c77832a33c 100644 --- a/stress/src/throughput.rs +++ b/stress/src/throughput.rs @@ -36,7 +36,7 @@ where if let Some(arg_str) = args_iter.nth(1) { let arg = arg_str.parse::(); - if !arg.is_ok() { + if arg.is_err() { eprintln!("Invalid command line argument '{}' as number of threads. Make sure the value is a positive integer.", arg_str); std::process::exit(1); } @@ -50,7 +50,7 @@ where arg_num, num_threads ); } - num_threads = arg_num as usize; + num_threads = arg_num; } else { eprintln!("Invalid command line argument {} as number of threads. Make sure the value is above 0 and less than or equal to number of available logical cores ({}).", arg_num, num_threads); std::process::exit(1);