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

PanicReason rework #477

Merged
merged 5 commits into from
Jun 13, 2023
Merged

PanicReason rework #477

merged 5 commits into from
Jun 13, 2023

Conversation

Dentosal
Copy link
Member

@Dentosal Dentosal commented Jun 6, 2023

Updates PanicReason to automatically derive conversion traits, removing the need for manual bookkeeping of error numbers. This also removes some of the unused error variants. The unutilized InvalidPanicReason error is removed as well, and merged into UnknownPanicReason variant.

This PR is in preparation for adding more granular PanicReason variants.

Originally from #461, and extracted here for a separate review.

Alternatives

Instead of removing unused errors and reordering the rest, the same numeric values could be kept. However, nobody should be depending on the numeric values, which I consider to be strictly an implementation detail of the VM.

@Dentosal Dentosal added breaking A breaking api change tech-debt fuel-asm Related to the `fuel-asm` crate. labels Jun 6, 2023
@Dentosal Dentosal requested a review from a team June 6, 2023 08:37
@Dentosal Dentosal self-assigned this Jun 6, 2023
@xgreenx xgreenx added this pull request to the merge queue Jun 13, 2023
Merged via the queue into master with commit c1810f7 Jun 13, 2023
@xgreenx xgreenx deleted the dento/panic-reason-rework branch June 13, 2023 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking api change fuel-asm Related to the `fuel-asm` crate. tech-debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants