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

ndk/media_error: Flatten MediaStatus and MediaError with catch_all #432

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

MarijnS95
Copy link
Member

@MarijnS95 MarijnS95 commented Sep 13, 2023

Depends on #431

Since bumping our MSRV to 1.66 num_enum provides a catch_all variant which we can use to store yet-unknown or yet-unmapped error codes, rather than having them in a secondary enum which derives thiserror.

This also allows us to get rid of a manual match statement, which can be (but could already have been...) generated by num_enum via TryFromPrimitive before.

@MarijnS95 MarijnS95 force-pushed the msrv-1.66 branch 2 times, most recently from 02a8d56 to 8d0648d Compare September 14, 2023 13:27
Base automatically changed from msrv-1.66 to master September 15, 2023 18:11
Since bumping our MSRV to 1.66 `num_enum` provides a `catch_all` variant
which we can use to store yet-unknown or yet-unmapped error codes,
rather than having them in a secondary `enum` which derives `thiserror`.

This also allows us to get rid of a manual `match` statement, which can
be (but could already have been...) generated by `num_enum` via
`TryFromPrimitive` before.
@MarijnS95 MarijnS95 merged commit 66af2c3 into master Sep 16, 2023
36 checks passed
@MarijnS95 MarijnS95 deleted the media-error-flatten-status branch September 16, 2023 08:24
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.

None yet

1 participant