Skip to content

Conversation

@MarijnS95
Copy link
Member

Platform specific - i.e. POSIX - error codes can be wrapped in humand readable form by Rust's std through Error::from_raw_os_error(). Certain NDK interfaces use these codes directly from errno.h through Errors.h.

@MarijnS95
Copy link
Member Author

@lattice0 this is what I was thinking about in your PR (#262), but couldn't quite find it back then 😅

Platform specific - i.e. POSIX - error codes can be wrapped in humand
readable form by Rust's `std` through [`Error::from_raw_os_error()`].
Certain NDK interfaces use these codes directly from `errno.h` through
[`Errors.h`].

[`Error::from_raw_os_error()`]: https://doc.rust-lang.org/std/io/struct.Error.html#method.from_raw_os_error
[`Errors.h`]: https://cs.android.com/android/platform/superproject/+/master:system/core/libutils/include/utils/Errors.h
@MarijnS95 MarijnS95 added blocking a release Prevents a new release difficulty: easy Likely easier than most tasks here status: needs review A maintainer must review this code labels Jun 11, 2022
@lattice0
Copy link
Contributor

Awesome! Much cleaner now 😍

@MarijnS95 MarijnS95 merged commit 29a69d2 into master Jun 11, 2022
@MarijnS95 MarijnS95 deleted the posix-io-error branch June 11, 2022 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocking a release Prevents a new release difficulty: easy Likely easier than most tasks here status: needs review A maintainer must review this code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants