mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-17 02:08:28 +00:00
2bdadd8e7d
Preserve raw strs for: format!(s) to s.to_string() lint fixes #6142 clippy::useless_format will keep the source's string (after converting {{ and }} to { and }) when suggesting a change from format!() to .to_string() usage. Ie: | let s = format!(r#""hello {{}}""#); | ^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `r#""hello {}""#.to_string()` changelog: [`useless_format`]: preserve raw string literals when no arguments to `format!()` are provided. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |