Skip to content

Commit

Permalink
Merge pull request #64 from ids1024/rustix
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix authored Dec 28, 2023
2 parents 790799e + 1b9e36f commit d27bf98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ version = "0.8"
optional = true

[dev-dependencies]
nix = "0.26"
rustix = { version = "0.38", features = ["event"] }

[features]
default = ["udev", "log", "libinput_1_21"]
Expand Down
9 changes: 4 additions & 5 deletions src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,15 @@ impl Libinput {
///
/// ```
/// # extern crate libc;
/// # extern crate nix;
/// # extern crate rustix;
/// #
/// # use std::fs::{File, OpenOptions};
/// # use std::os::unix::{fs::OpenOptionsExt, io::{AsRawFd, OwnedFd}};
/// # use std::os::unix::{fs::OpenOptionsExt, io::OwnedFd};
/// # use std::path::Path;
/// # use libc::{O_RDONLY, O_RDWR, O_WRONLY};
/// #
/// use input::{Libinput, LibinputInterface};
/// use nix::poll::{poll, PollFlags, PollFd};
/// use rustix::event::{poll, PollFlags, PollFd};
///
/// # struct Interface;
/// #
Expand Down Expand Up @@ -385,8 +385,7 @@ impl Libinput {
/// let mut input = Libinput::new_with_udev(Interface);
/// input.udev_assign_seat("seat0").unwrap();
///
/// let pollfd = PollFd::new(input.as_raw_fd(), PollFlags::POLLIN);
/// while poll(&mut [pollfd], -1).is_ok() {
/// while poll(&mut [PollFd::new(&input, PollFlags::IN)], -1).is_ok() {
/// input.dispatch().unwrap();
/// for event in &mut input {
/// // do some processing...
Expand Down

0 comments on commit d27bf98

Please sign in to comment.