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

Mark error enums as non-exhaustive #1227

Merged
merged 4 commits into from
Aug 29, 2023
Merged

Conversation

PhilippGackstatter
Copy link
Contributor

@PhilippGackstatter PhilippGackstatter commented Aug 29, 2023

Description of change

Mark error enums and other enums to which it is applicable as non-exhaustive. This is in effort to be more future-proof and be able to add more variants in a non-breaking way.

Also feature-gate the encode_jwk function behind flags under which it is actually necessary.

Links to any relevant issues

n/a

Type of change

Add an x to the boxes that are relevant to your changes.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

How the change has been tested

cargo clippy for the non-exhaustive additions.

Change checklist

Add an x to the boxes that are relevant to your changes.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@PhilippGackstatter PhilippGackstatter added Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog. labels Aug 29, 2023
@PhilippGackstatter PhilippGackstatter added this to the v0.7 Features milestone Aug 29, 2023
@PhilippGackstatter PhilippGackstatter merged commit 4b5ff05 into main Aug 29, 2023
@PhilippGackstatter PhilippGackstatter deleted the non-exhaustive-enums branch August 29, 2023 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Breaking change A change to the API that requires a major release. Part of "Changed" section in changelog Rust Related to the core Rust code. Becomes part of the Rust changelog.
Projects
Development

Successfully merging this pull request may close these issues.

2 participants