Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msrv patch for tokio-stream, and other lint changes #2086

Merged
merged 5 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading