Skip to content
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

style: Use Arc::clone() instead of .clone() #1870

Merged
merged 2 commits into from
Jun 17, 2024
Merged

style: Use Arc::clone() instead of .clone() #1870

merged 2 commits into from
Jun 17, 2024

Conversation

b-zee
Copy link
Contributor

@b-zee b-zee commented Jun 11, 2024

  • style: use fully qualified Arc::clone syntax

Add the `clippy::clone_on_ref_ptr` lint to warn for using `.clone()`
which will call e.g. `Arc::clone()`. It's important to realize that the
underlying data is not cloned, but a new (`Arc`) instance is created.
(Meaning the reference counter is increased.)
@b-zee b-zee enabled auto-merge June 17, 2024 07:52
@b-zee b-zee added this pull request to the merge queue Jun 17, 2024
Merged via the queue into maidsafe:main with commit 7bfeffd Jun 17, 2024
40 checks passed
@b-zee b-zee deleted the style-clone-on-ref-ptr branch June 17, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants