Skip to content

Commit e88283a

Browse files
committed
Clippy cleanup: uninlined_format_args
1 parent 2d9cc44 commit e88283a

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

examples/getifaddrs.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn main() {
3030
.address
3131
.as_ref()
3232
.and_then(SockaddrStorage::family)
33-
.map(|af| format!("{:?}", af))
33+
.map(|af| format!("{af:?}"))
3434
.unwrap_or("".to_owned());
3535
match (
3636
&addr.address,
@@ -39,16 +39,14 @@ fn main() {
3939
&addr.destination,
4040
) {
4141
(Some(a), Some(nm), Some(b), None) => {
42-
println!("\t{} {} netmask {} broadcast {}", family, a, nm, b)
42+
println!("\t{family} {a} netmask {nm} broadcast {b}")
4343
}
4444
(Some(a), Some(nm), None, None) => {
45-
println!("\t{} {} netmask {}", family, a, nm)
45+
println!("\t{family} {a} netmask {nm}")
4646
}
47-
(Some(a), None, None, None) => println!("\t{} {}", family, a),
48-
(Some(a), None, None, Some(d)) => {
49-
println!("\t{} {} -> {}", family, a, d)
50-
}
51-
x => todo!("{:?}", x),
47+
(Some(a), None, None, None) => println!("\t{family} {a}"),
48+
(Some(a), None, None, Some(d)) => println!("\t{family} {a} -> {d}"),
49+
x => todo!("{x:?}"),
5250
}
5351
}
5452
}

test/sys/test_sockopt.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,7 @@ fn test_tcp_congestion() {
291291
for b in bytes.iter() {
292292
assert_ne!(
293293
*b, 0,
294-
"OsString should contain no embedded NULs: {:?}",
295-
val
294+
"OsString should contain no embedded NULs: {val:?}"
296295
);
297296
}
298297
setsockopt(&fd, sockopt::TcpCongestion, &val).unwrap();

0 commit comments

Comments
 (0)