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/audio: Merge AudioResult variant enum into AudioError #467

Merged
merged 1 commit into from
Feb 4, 2024

Conversation

MarijnS95
Copy link
Member

Depends on #459

Now that UnsupportedValue is no longer part of AudioError thanks to all enums having a proper __Unknown(x) catch-all (making the enum API a whole lot more convenient to users), this #[error] enum is just a wrapper struct with only one variant.

Instead, drop AudioError and its thiserror wrapping completely, and import Error directly on the aaudio_result_t enum that is also renamed to AudioError.

@MarijnS95 MarijnS95 requested a review from rib January 18, 2024 22:51
@MarijnS95 MarijnS95 added the impact: breaking API/ABI-breaking change label Jan 18, 2024
@MarijnS95 MarijnS95 force-pushed the audio-rework-result-enum branch from 07be268 to ff6f361 Compare January 18, 2024 22:55
@MarijnS95 MarijnS95 force-pushed the audio-rework-result-enum branch from ff6f361 to fa72a15 Compare January 27, 2024 22:12
@MarijnS95 MarijnS95 force-pushed the non-exhaustive-enums branch 2 times, most recently from aea39d3 to 8216763 Compare January 29, 2024 08:28
@MarijnS95 MarijnS95 force-pushed the audio-rework-result-enum branch from fa72a15 to a027321 Compare January 29, 2024 08:28
Base automatically changed from non-exhaustive-enums to master January 29, 2024 16:35
@MarijnS95 MarijnS95 force-pushed the audio-rework-result-enum branch from a027321 to b823e22 Compare January 29, 2024 16:35
@MarijnS95 MarijnS95 marked this pull request as ready for review January 29, 2024 23:21
Now that `UnsupportedValue` is no longer part of `AudioError` thanks to
all enums having a proper `__Unknown(x)` catch-all (making the `enum`
API a whole lot more convenient to users), this `#[error]` enum is just
a wrapper struct with only one variant.

Instead, drop `AudioError` and its `thiserror` wrapping completely,
and import `Error` directly on the `aaudio_result_t` `enum` that is
also renamed to `AudioError`.
@MarijnS95 MarijnS95 force-pushed the audio-rework-result-enum branch from b823e22 to c1494d5 Compare February 4, 2024 16:28
@MarijnS95 MarijnS95 merged commit e932c84 into master Feb 4, 2024
38 checks passed
@MarijnS95 MarijnS95 deleted the audio-rework-result-enum branch February 4, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: breaking API/ABI-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants