Summary
When the char to replace is a double quote ", clippy suggests to replace it using the escape character, but in this case the escape character is not needed.
Reproducer
error: single-character string constant used as pattern
--> crates/.../src/lib.rs:79:92
|
79 | ... let clean_string = lit.to_string().replace("\"", "");
| ^^^^ help: try using a `char` instead: `'\"'`
The message should be:
try using a `char` instead: `'"'`
Version
rustc 1.73.0-nightly (0d95f9132 2023-07-26)
binary: rustc
commit-hash: 0d95f9132909ae7c5f2456748d0ffd1c3ba4a8e8
commit-date: 2023-07-26
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5
Additional Labels
No response