Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down