5a28d8f01e
fix false positive in Issue/12098 because lack of consideration of mutable caller fixes [Issue#12098](https://github.com/rust-lang/rust-clippy/issues/12098) In issue#12098, the former code doesn't consider the caller for clone is mutable, and suggests to delete clone function. In this change, we first get the inner caller requests for clone, and if it's immutable, the following code will suggest deleting clone. If it's mutable, the loop will check whether a borrow check violation exists, if exists, the lint should not execute, and the function will directly return; otherwise, the following code will handle this. changelog: [`clippy::unnecessary_to_owned`]: fix false positive |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |