diff --git a/src/device.rs b/src/device.rs index 244bdbe9..10a2b937 100644 --- a/src/device.rs +++ b/src/device.rs @@ -527,6 +527,7 @@ pub struct Device { } unsafe impl Send for Device {} +unsafe impl Sync for Device {} impl DeviceWrapper for Device { fn raw(&self) -> *mut raw::libevdev { @@ -789,6 +790,12 @@ impl Device { } } +impl AsRawFd for Device { + fn as_raw_fd(&self) -> std::os::unix::prelude::RawFd { + self.file.as_raw_fd() + } +} + impl Drop for Device { fn drop(&mut self) { unsafe {