rust-clippy
rust-clippy copied to clipboard
Useless format case `format!("{}", foo)` isn't listed for
The useless_format lint identifies two cases:
format!("foo")format!("{}", foo)
The first one works great, but the second one is ignored (gets no warning).
I noticed this while working on PR #2539. I originally thought that there just wasn't a test case in rust-clippy/tests/ui/format.rs, but after trying to add I noticed that there already was one, and the one I added also didn't get any warning. I also tried running clippy on a separate project and also got no warning.