Skip to content

Commit 6c4f50e

Browse files
authored
msrv patch for tokio-stream, and other lint changes (#2086)
1 parent a50e3ff commit 6c4f50e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

examples/self-diagnostics/src/main.rs

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use once_cell::sync::Lazy;
1212
use std::collections::HashSet;
1313
use std::sync::{Arc, Mutex};
1414

15-
use ctrlc;
1615
use std::sync::mpsc::channel;
1716

1817
struct ErrorState {

opentelemetry-sdk/src/metrics/view.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub fn new_view(criteria: Instrument, mask: Stream) -> Result<Box<dyn View>> {
107107
)));
108108
return Ok(Box::new(empty_view));
109109
}
110-
let contains_wildcard = criteria.name.contains(|c| c == '*' || c == '?');
110+
let contains_wildcard = criteria.name.contains(['*', '?']);
111111
let err_msg_criteria = criteria.clone();
112112

113113
let match_fn: Box<dyn Fn(&Instrument) -> bool + Send + Sync> = if contains_wildcard {

opentelemetry-zipkin/src/exporter/model/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ pub(crate) fn into_zipkin_span(local_endpoint: Endpoint, span_data: SpanData) ->
3737
span_data
3838
.attributes
3939
.into_iter()
40-
.map(|kv| {
40+
.inspect(|kv| {
4141
if kv.key == Key::new("span.kind") {
4242
user_defined_span_kind = true;
4343
}
44-
kv
4544
})
4645
.chain(
4746
[

scripts/patch_dependencies.sh

+2
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ patch_version cc 1.0.105
1010
patch_version url 2.5.0
1111
patch_version hyper-rustls 0.27.2 # 0.27.3 needs rustc v1.70.0
1212
patch_version tokio-util 0.7.11 # 0.7.12 needs rustc v1.70.0
13+
patch_version tokio-stream 0.1.15 # 0.1.16 needs rustc v1.70.0
14+

stress/src/throughput.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ where
3636
if let Some(arg_str) = args_iter.nth(1) {
3737
let arg = arg_str.parse::<usize>();
3838

39-
if !arg.is_ok() {
39+
if arg.is_err() {
4040
eprintln!("Invalid command line argument '{}' as number of threads. Make sure the value is a positive integer.", arg_str);
4141
std::process::exit(1);
4242
}
@@ -50,7 +50,7 @@ where
5050
arg_num, num_threads
5151
);
5252
}
53-
num_threads = arg_num as usize;
53+
num_threads = arg_num;
5454
} else {
5555
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);
5656
std::process::exit(1);

0 commit comments

Comments
 (0)