| 1 |
--- rust-evdev-0.13.2.orig/Cargo.toml |
| 2 |
+++ rust-evdev-0.13.2/Cargo.toml |
| 3 |
@@ -115,7 +115,7 @@ version = "0.2.121" |
| 4 |
features = ["extra_traits"] |
| 5 |
|
| 6 |
[dependencies.nix] |
| 7 |
-version = "0.29" |
| 8 |
+version = "0.30" |
| 9 |
features = [ |
| 10 |
"ioctl", |
| 11 |
"fs", |
| 12 |
--- rust-evdev-0.13.2.orig/src/raw_stream.rs |
| 13 |
+++ rust-evdev-0.13.2/src/raw_stream.rs |
| 14 |
@@ -785,7 +785,7 @@ mod tokio_stream { |
| 15 |
impl EventStream { |
| 16 |
pub(crate) fn new(device: RawDevice) -> io::Result<Self> { |
| 17 |
use nix::fcntl; |
| 18 |
- fcntl::fcntl(device.as_raw_fd(), fcntl::F_SETFL(fcntl::OFlag::O_NONBLOCK))?; |
| 19 |
+ fcntl::fcntl(&device, fcntl::F_SETFL(fcntl::OFlag::O_NONBLOCK))?; |
| 20 |
let device = AsyncFd::new(device)?; |
| 21 |
Ok(Self { device, index: 0 }) |
| 22 |
} |
| 23 |
--- rust-evdev-0.13.2.orig/src/sync_stream.rs |
| 24 |
+++ rust-evdev-0.13.2/src/sync_stream.rs |
| 25 |
@@ -365,9 +365,9 @@ impl Device { |
| 26 |
/// Set `O_NONBLOCK` on this device handle. |
| 27 |
pub fn set_nonblocking(&self, nonblocking: bool) -> io::Result<()> { |
| 28 |
let mut flags = |
| 29 |
- fcntl::OFlag::from_bits_retain(fcntl::fcntl(self.as_raw_fd(), fcntl::F_GETFL)?); |
| 30 |
+ fcntl::OFlag::from_bits_retain(fcntl::fcntl(self, fcntl::F_GETFL)?); |
| 31 |
flags.set(fcntl::OFlag::O_NONBLOCK, nonblocking); |
| 32 |
- fcntl::fcntl(self.as_raw_fd(), fcntl::F_SETFL(flags))?; |
| 33 |
+ fcntl::fcntl(self, fcntl::F_SETFL(flags))?; |
| 34 |
Ok(()) |
| 35 |
} |
| 36 |
|
| 37 |
--- rust-evdev-0.13.2.orig/src/uinput.rs |
| 38 |
+++ rust-evdev-0.13.2/src/uinput.rs |
| 39 |
@@ -585,7 +585,7 @@ mod tokio_stream { |
| 40 |
impl VirtualEventStream { |
| 41 |
pub(crate) fn new(device: VirtualDevice) -> io::Result<Self> { |
| 42 |
use nix::fcntl; |
| 43 |
- fcntl::fcntl(device.as_raw_fd(), fcntl::F_SETFL(fcntl::OFlag::O_NONBLOCK))?; |
| 44 |
+ fcntl::fcntl(&device, fcntl::F_SETFL(fcntl::OFlag::O_NONBLOCK))?; |
| 45 |
let device = AsyncFd::new(device)?; |
| 46 |
Ok(Self { device, index: 0 }) |
| 47 |
} |