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

User story: I want to enforce particular style for (say) cloning of strings #34

Open
safinaskar opened this issue Feb 12, 2023 · 1 comment
Labels
A-user-story Area: A user story or a related issue

Comments

@safinaskar
Copy link

Lint explanation

There are zillions of ways to clone a string: a.clone(), a.to_owned(), a.to_string(), Clone::clone(&a), String::clone(&a), etc. I want to be able to write a lint to enforce some particular style for my project

@safinaskar safinaskar added the A-user-story Area: A user story or a related issue label Feb 12, 2023
@xFrednet
Copy link
Member

Thank you for the issue, this will definitely be possible. I think this should/could even be a Clippy lint, with a config value. It's similar to how stings can also be created in far too many ways :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-user-story Area: A user story or a related issue
Projects
None yet
Development

No branches or pull requests

2 participants