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

core: Make more types non-exhaustive #189

Merged
merged 1 commit into from
Dec 19, 2024
Merged

core: Make more types non-exhaustive #189

merged 1 commit into from
Dec 19, 2024

Conversation

robin-nitrokey
Copy link
Member

This patch marks more types as non-exhaustive that could be extended in the future and that don’t need to be matched exhaustively:

  • KeySerialization
  • SignatureSerialization
  • consent::Error

The only exhaustive types that could be realistically be extended in the future are now the request and reply structs. But marking these as non-exhaustive would make it very complex for the backends to implement these syscalls. We can try to find a solution for that when we think about alternative syscall implementations, e. g. using a builder pattern.

This patch marks more types as non-exhaustive that could be extended in
the future and that don’t need to be matched exhaustively:
- KeySerialization
- SignatureSerialization
- consent::Error

The only exhaustive types that could be realistically be extended in
the future are now the request and reply structs.  But marking these as
non-exhaustive would make it very complex for the backends to implement
these syscalls.  We can try to find a solution for that when we think
about alternative syscall implementations, e. g. using a builder
pattern.
@robin-nitrokey robin-nitrokey merged commit f97475e into main Dec 19, 2024
2 checks passed
@robin-nitrokey robin-nitrokey deleted the exhaustive branch December 19, 2024 17:04
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