1
0
Fork 0
forked from wry/wry

all: simplify handling of Errno values

This commit is contained in:
Julian Orth 2026-04-02 18:34:12 +02:00
parent 9c605df692
commit 34914eccb0
58 changed files with 443 additions and 464 deletions

View file

@ -28,7 +28,7 @@ use {
isnt::std_1::primitive::IsntConstPtrExt,
std::{ffi::CStr, rc::Rc},
thiserror::Error,
uapi::{Errno, IntoUstr, OwnedFd, c},
uapi::{IntoUstr, OwnedFd, c},
};
static INTERFACE: libinput_interface = libinput_interface {
@ -141,7 +141,7 @@ impl LibInput {
pub fn dispatch(&self) -> Result<(), LibInputError> {
let res = unsafe { libinput_dispatch(self.li) };
if res < 0 {
Err(LibInputError::Dispatch(Errno(-res).into()))
Err(LibInputError::Dispatch(OsError(-res)))
} else {
Ok(())
}