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

A way to require enum variant index being specified #666

Open
nazar-pc opened this issue Dec 14, 2024 · 0 comments
Open

A way to require enum variant index being specified #666

nazar-pc opened this issue Dec 14, 2024 · 0 comments

Comments

@nazar-pc
Copy link
Contributor

I think it would be valuable to make an enum variant index required in derived code.

The way to approach this might be to have a separate feature that would generate a compile-time warning when #[codec(index = something)] is missing.

This is important in blockchain environment where some data structures can evolve over time and refactoring can accidentally break things.

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

No branches or pull requests

1 participant