Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This primarily contains two useful fixes related to our error APIs:
capi: error: map pure-Rust errors into equivalent errno values
(capi: map libpathrs-generated errors to equivalent errno values #60)errors: document and export ErrorKind
(errors: figure out if/how to expose ErrorKind #61)From the changelog:
ErrorKind
is now exported, allowing you to programmatically handleerrors returned by libpathrs. This interface may change in the future (in
particular,
ErrorKind::OsError
might change its representation oferrno
values).
being passed by users) will now contain a
saved_errno
value that makessense for the error type (so
ErrorKind::InvalidArgument
will result in anEINVAL
value forsaved_errno
). This will allow C users to have a nicertime handling errors programmatically.
Fixes #60
Fixes #61
Signed-off-by: Aleksa Sarai cyphar@cyphar.com