Skip to content

Commit 4d43afd

Browse files
Update criterion requirement from 0.6 to 0.7 (#78)
* Update criterion requirement from 0.6 to 0.7 Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md) - [Commits](bheisler/criterion.rs@0.6.0...0.7.0) --- updated-dependencies: - dependency-name: criterion dependency-version: 0.7.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> * chore: bump rust to 1.88 * refactor: clippy rules --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Emiliano Bovetti <[email protected]>
1 parent 36aa0e1 commit 4d43afd

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

.mise.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[tools]
2-
rust = "1.74"
2+
rust = "1.88"

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ thiserror = {version = "2.0", default-features = false}
2020
serde = {version = "1", optional = true}
2121

2222
[dev-dependencies]
23-
criterion = "0.6"
23+
criterion = "0.7"
2424
mockall = {version = "0.13", default-features = false}
2525
rand = "0.9.1"
2626
serial_test = {version = "3.0.0", default-features = false}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rust:1.74.0
1+
FROM rust:1.88.0
22

33
WORKDIR /code
44

benches/basic_incr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn setup(_: &mut Criterion) {
1818

1919
fn incr_benchmark(c: &mut Criterion) {
2020
// 20 test tags to simulate a normal to heavily tagged metric
21-
let tags = (0..20).map(|i| format!("tag_{}", i)).collect::<Vec<_>>();
21+
let tags = (0..20).map(|i| format!("tag_{i}")).collect::<Vec<_>>();
2222
c.bench_function("incr_benchmark", |b| {
2323
b.iter(|| {
2424
// Note: clone here is ok since we only care about /relative/ perf here
@@ -28,7 +28,7 @@ fn incr_benchmark(c: &mut Criterion) {
2828
}
2929

3030
fn incr_with_too_many_tags(c: &mut Criterion) {
31-
let tags = (0..22).map(|i| format!("tag_{}", i)).collect::<Vec<_>>();
31+
let tags = (0..22).map(|i| format!("tag_{i}")).collect::<Vec<_>>();
3232
c.bench_function("incr_with_too_many_tags", |b| {
3333
b.iter(|| {
3434
Datadog::incr("test", tags.clone());

src/configuration/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ impl Configuration {
4747
}
4848

4949
pub fn with_environment(mut self, environment: Environment) -> Self {
50-
self.tags.push(format!("env:{}", environment));
50+
self.tags.push(format!("env:{environment}"));
5151
self
5252
}
5353

5454
pub fn with_tag<T: Display>(mut self, key: &str, value: &T) -> Self {
55-
self.tags.push(format!("{}:{}", key, value));
55+
self.tags.push(format!("{key}:{value}"));
5656
self
5757
}
5858

@@ -120,16 +120,16 @@ impl From<Configuration> for dogstatsd::Options {
120120
fn get_env_tags() -> Vec<String> {
121121
let mut tags = vec![];
122122
if let Ok(part_of) = std::env::var("KUBE_APP_PART_OF") {
123-
tags.push(format!("kube_app_part_of:{}", part_of));
123+
tags.push(format!("kube_app_part_of:{part_of}"));
124124
}
125125
if let Ok(managed_by) = std::env::var("KUBE_APP_MANAGED_BY") {
126-
tags.push(format!("kube_app_managed_by:{}", managed_by));
126+
tags.push(format!("kube_app_managed_by:{managed_by}"));
127127
}
128128
if let Ok(version) = std::env::var("KUBE_APP_VERSION") {
129-
tags.push(format!("kube_app_version:{}", version));
129+
tags.push(format!("kube_app_version:{version}"));
130130
}
131131
if let Ok(instance) = std::env::var("KUBE_APP_INSTANCE") {
132-
tags.push(format!("kube_app_instance:{}", instance));
132+
tags.push(format!("kube_app_instance:{instance}"));
133133
}
134134
tags
135135
}

0 commit comments

Comments
 (0)