Skip to content

Conversation

@sorairolake
Copy link
Contributor

This can be replaced by a derive attribute.

This can be replaced by a derive attribute.
@hasenbanck
Copy link
Owner

What problem does this solve? This PR goes into the realm of "matter of taste" and doesn't seem to solve an issue.

@sorairolake
Copy link
Contributor Author

@hasenbanck This is to make it the same style as #37. The only enumerations in this crate that implement Default are CheckType and MfType. This is a matter of taste, but I did this because I could unify the style with just a few changes.

@hasenbanck
Copy link
Owner

Okay, I will not merge this PR. Please stop for now providing refactors or style changes. I'm tankful for contributions, but please only submit PRs that solve an actual problem for the user, or that provide a tangible improvement to them.

@hasenbanck hasenbanck closed this Sep 4, 2025
@sorairolake
Copy link
Contributor Author

sorairolake commented Sep 4, 2025

@hasenbanck If you replace the Self::Hc4 with MfType::Hc4, clippy will print a warning.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=563f7f2924d47ef3d2164922fbcddb04

The category of clippy::derivable_impls is clippy::complexity and its default level is warn. Currently Self::Hc4 does not output a warning, but I think this is a bug that was fixed in rust-lang/rust-clippy#15535. So in the near future, clippy may start printing a warning and causing CI to fail.

However, this is easy to fix, so it may be enough to fix it once clippy actually starts printing the warning.

@sorairolake sorairolake deleted the replace-manual-default-for-mf-type branch September 4, 2025 19: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