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

Add #[must_use] to generated as_ method. #13312

Closed
nitsky opened this issue Sep 29, 2022 · 3 comments · Fixed by #13359
Closed

Add #[must_use] to generated as_ method. #13312

nitsky opened this issue Sep 29, 2022 · 3 comments · Fixed by #13359
Labels
A-assists C-feature Category: feature request S-actionable Someone could pick this issue up and work on it right now

Comments

@nitsky
Copy link

nitsky commented Sep 29, 2022

Generated as_ methods for enum variants do not have #[must_use], causing clippy to display an error.

Screen Shot 2022-09-29 at 10 47 49 AM

@lnicola
Copy link
Member

lnicola commented Sep 29, 2022

We had this and too many people complained. I don't think you should be enabling the pedantic ones anyway.

@nitsky
Copy link
Author

nitsky commented Sep 29, 2022

Okay, closing. I like using clippy::pedantic because it helps enforce a consistent code style.

@nitsky nitsky closed this as completed Sep 29, 2022
@lnicola
Copy link
Member

lnicola commented Sep 29, 2022

It should probably be configurable.

Hello from someone who tried Tangram/ModelFox, BTW!

@lnicola lnicola reopened this Sep 29, 2022
@lnicola lnicola added S-actionable Someone could pick this issue up and work on it right now A-assists C-feature Category: feature request labels Sep 29, 2022
@bors bors closed this as completed in af1f48d Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-assists C-feature Category: feature request S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants