Optimize `redundant_clone` Fixes #8412 changelog: none
This crate contains Clippy lints. For the main crate, check GitHub.