Skip to content

Commit

Permalink
msrv patch for tokio-stream, and other lint changes (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb authored Sep 9, 2024
1 parent a50e3ff commit 6c4f50e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion examples/self-diagnostics/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion opentelemetry-sdk/src/metrics/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub fn new_view(criteria: Instrument, mask: Stream) -> Result<Box<dyn View>> {
)));
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<dyn Fn(&Instrument) -> bool + Send + Sync> = if contains_wildcard {
Expand Down
3 changes: 1 addition & 2 deletions opentelemetry-zipkin/src/exporter/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down
2 changes: 2 additions & 0 deletions scripts/patch_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

4 changes: 2 additions & 2 deletions stress/src/throughput.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ where
if let Some(arg_str) = args_iter.nth(1) {
let arg = arg_str.parse::<usize>();

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);
}
Expand All @@ -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);
Expand Down

0 comments on commit 6c4f50e

Please sign in to comment.