-
Notifications
You must be signed in to change notification settings - Fork 726
Disable clippy::clone_on_ref_ptr
lint
#2474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is not contributing significantly to code quality. In cases where an `Arc<T>` is cloned into an upcast of `Arc<dyn Trait>` (where `T: Trait`) it actively makes the code less readable by forcing the repetition of `Arc::<T>::clone`.
Benchmark resultsInstruction countsSignificant differencesClick to expand
Other differencesClick to expand
Wall-timeSignificant differencesThere are no significant wall-time differences Other differencesClick to expand
Additional informationCheckout details:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2474 +/- ##
=======================================
Coverage 95.33% 95.33%
=======================================
Files 97 97
Lines 21506 21506
=======================================
Hits 20502 20502
Misses 1004 1004 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also get rid of existing Arc::clone
calls?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Will do this in a later PR. |
This is not contributing significantly to code quality.
In cases where an
Arc<T>
is cloned into an upcast ofArc<dyn Trait>
(whereT: Trait
) it actively makes the code less readable by forcing the repetition ofArc::<T>::clone
.Upstream issue: rust-lang/rust-clippy#2048
I looked into moving our lint configuration in the workspace's Cargo.toml, but actually it would mean reading three files (both lib.rs, and two Cargo.tomls) to determine which lints applied. Unfortunately you cannot layer lints just in Cargo.toml -- upstream issue for that is rust-lang/cargo#13157