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

Enable clippy rule clone_on_ref_ptr #31

Merged

Conversation

akoshelev
Copy link
Collaborator

@martinthomson
Copy link
Member

Given that CI already runs with clippy::pedantic, isn't this covered already? We just have memorialized it in the code, but we could do that instead. (Adding one lint at a time seems like it might take a lot of effort.)

@akoshelev
Copy link
Collaborator Author

Given that CI already runs with clippy::pedantic, isn't this covered already? We just have memorialized it in the code, but we could do that instead. (Adding one lint at a time seems like it might take a lot of effort.)

I think the default clippy setting is allow, so clippy::pedantic does not block these. I thought we could use .clippy.toml for it but it is marked unstable so given that we don't have code that uses <arc>.clone() yet, this might be a good way to prevent it from appearing in the repository. I think the pipeline PR violates this rule already

@martinthomson
Copy link
Member

Oh, I didn't check the rule's default enforcement. I wonder why it never made it into the pedantic set...

If we merge this first, the pipeline code will hit it :)

@martinthomson martinthomson merged commit 1f88093 into private-attribution:main Jun 8, 2022
@akoshelev akoshelev deleted the clippy-clone-on-ref-rule branch June 8, 2022 02:01
@akoshelev
Copy link
Collaborator Author

I think it is considered controversial rust-lang/rust-clippy#2048, but we can see whether it works for us :)

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