rust-mobile / ndk

Rust bindings to the Android NDK
Apache License 2.0
1.11k stars 110 forks source link

ndk/audio: Merge `AudioResult` variant enum into `AudioError` #467

Closed MarijnS95 closed 7 months ago

MarijnS95 commented 7 months ago

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.