rust: pin-init: examples: fix useless_borrows_in_formatting clippy warning

Clippy 1.97 introduces new `useless_borrows_in_formatting` warning which
fires on the examples as we have `&*expr` where the format macro takes
reference already. Remove the extra borrow.

Link: https://patch.msgid.link/20260505115138.2466966-1-gary@kernel.org
Signed-off-by: Gary Guo <gary@garyguo.net>
This commit is contained in:
Gary Guo
2026-05-05 12:51:37 +01:00
parent faed81945d
commit 430654211d
3 changed files with 3 additions and 3 deletions

View File

@@ -218,7 +218,7 @@ fn main() {
for h in handles {
h.join().expect("thread panicked");
}
println!("{:?}", &*mtx.lock());
println!("{:?}", *mtx.lock());
assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
}

View File

@@ -177,7 +177,7 @@ fn main() {
for h in handles {
h.join().expect("thread panicked");
}
println!("{:?}", &*mtx.lock());
println!("{:?}", *mtx.lock());
assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
}

View File

@@ -117,7 +117,7 @@ fn main() {
for h in handles {
h.join().expect("thread panicked");
}
println!("{:?}, {:?}", &*mtx.lock(), &*COUNT.lock());
println!("{:?}, {:?}", *mtx.lock(), *COUNT.lock());
assert_eq!(*mtx.lock(), workload * thread_count * 2);
}
}