-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
std::io::Error
for error results, except get_planar_framebuffer
Based on discussion on #173. Which this supersedes. All functions in `drm` and `drm_ffi` returning `SystemError`, except `get_planar_frambuffer`, only use it for representing standard Unix error kinds. So `std::io::Error` can be used instead. For `get_planar_framebuffer`, a `GetPlanarFramebufferError` error is defined. It might be nice if Rust has anonymous sum types for this sort of thing, but this seems like the typical pattern. And better than using the same error kind everywhere if `UnrecognizedFourcc` isn't possible in any other function. This should remove `nix` from the public API of the crate. This makes errors a bit simpler to handle for users of the library using `rustix` or a different version of `nix`, and allows `drm` to change which it uses without a breaking API change.
- Loading branch information
Showing
8 changed files
with
210 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.