Commit 45c299c
committed
Fix clippy::uninlined_format_args warning
```
error: variables can be used directly in the `format!` string
--> examples/linux-inotify.rs:55:17
|
55 | println!("{:?}", event);
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
55 - println!("{:?}", event);
55 + println!("{event:?}");
|
error: variables can be used directly in the `format!` string
--> benches/io.rs:35:30
|
35 | group.bench_function(format!("TcpStream.{}", driver_name), move |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
35 - group.bench_function(format!("TcpStream.{}", driver_name), move |b| {
35 + group.bench_function(format!("TcpStream.{driver_name}"), move |b| {
|
error: variables can be used directly in the `format!` string
--> benches/io.rs:58:34
|
58 | group.bench_function(format!("UnixStream.{}", driver_name), |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
58 - group.bench_function(format!("UnixStream.{}", driver_name), |b| {
58 + group.bench_function(format!("UnixStream.{driver_name}"), |b| {
|
error: variables can be used directly in the `format!` string
--> benches/io.rs:82:30
|
82 | group.bench_function(format!("TcpStream.{}", driver_name), move |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
82 - group.bench_function(format!("TcpStream.{}", driver_name), move |b| {
82 + group.bench_function(format!("TcpStream.{driver_name}"), move |b| {
|
error: variables can be used directly in the `format!` string
--> benches/io.rs:108:31
|
108 | let socket_addr = format!("/tmp/async-io-bench-{}.sock", id);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
108 - let socket_addr = format!("/tmp/async-io-bench-{}.sock", id);
108 + let socket_addr = format!("/tmp/async-io-bench-{id}.sock");
|
error: variables can be used directly in the `format!` string
--> benches/io.rs:111:34
|
111 | group.bench_function(format!("UnixStream.{}", driver_name), |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
111 - group.bench_function(format!("UnixStream.{}", driver_name), |b| {
111 + group.bench_function(format!("UnixStream.{driver_name}"), |b| {
|
error: variables can be used directly in the `format!` string
--> benches/io.rs:145:30
|
145 | group.bench_function(format!("UdpSocket.{}", driver_name), |b| {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
|
145 - group.bench_function(format!("UdpSocket.{}", driver_name), |b| {
145 + group.bench_function(format!("UdpSocket.{driver_name}"), |b| {
|
error: variables can be used directly in the `format!` string
--> benches/timer.rs:27:13
|
27 | format!("register_timer.({} previous timers)", prev_timer_count),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= 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
|
27 - format!("register_timer.({} previous timers)", prev_timer_count),
27 + format!("register_timer.({prev_timer_count} previous timers)"),
|
```1 parent a355982 commit 45c299c
3 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
0 commit comments