Skip to content

style: use variables directly in format!() - #1432

Merged
caspermeijn merged 1 commit into
tokio-rs:masterfrom
caspermeijn:fmt
Jun 1, 2026
Merged

style: use variables directly in format!()#1432
caspermeijn merged 1 commit into
tokio-rs:masterfrom
caspermeijn:fmt

Conversation

@caspermeijn

Copy link
Copy Markdown
Member

Prevent clippy warnings like:

error: variables can be used directly in the `format!` string
  --> benchmarks/benches/dataset.rs:40:47
   |
40 |     let mut group = criterion.benchmark_group(format!("dataset/{}", name));
   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
   = note: `-D clippy::uninlined-format-args` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]`
help: change this to
   |
40 -     let mut group = criterion.benchmark_group(format!("dataset/{}", name));
40 +     let mut group = criterion.benchmark_group(format!("dataset/{name}"));
   |

Prevent clippy warnings like:
```
error: variables can be used directly in the `format!` string
  --> benchmarks/benches/dataset.rs:40:47
   |
40 |     let mut group = criterion.benchmark_group(format!("dataset/{}", name));
   |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
   = note: `-D clippy::uninlined-format-args` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]`
help: change this to
   |
40 -     let mut group = criterion.benchmark_group(format!("dataset/{}", name));
40 +     let mut group = criterion.benchmark_group(format!("dataset/{name}"));
   |
```
@caspermeijn
caspermeijn enabled auto-merge June 1, 2026 04:27
@caspermeijn
caspermeijn added this pull request to the merge queue Jun 1, 2026
Merged via the queue into tokio-rs:master with commit 18ea4e4 Jun 1, 2026
17 checks passed
@caspermeijn
caspermeijn deleted the fmt branch June 1, 2026 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant