rust/clippy_lints
Philipp Krones a07e887e24
Improve string_to_string lint in case it is in a map call (#14396)
Fixes https://github.com/rust-lang/rust-clippy/issues/14175.

There are two "big" cases to handle: `.map(|x| x.to_string())` and
`.map(String::to_string)`. If the closure has more than one expression,
we should not suggest `.cloned()`.

changelog: Improve `string_to_string` lint in case it is in a map call

r? @samueltardieu
2025-03-18 10:29:10 +00:00
..
src Improve string_to_string lint in case it is in a map call (#14396) 2025-03-18 10:29:10 +00:00
Cargo.toml Bump Clippy version -> 0.1.87 2025-02-20 15:26:51 +01:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.