diff options
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | Cargo.toml.orig | 4 | ||||
-rw-r--r-- | tests/io_async_fd.rs | 11 |
3 files changed, 13 insertions, 6 deletions
@@ -205,10 +205,10 @@ version = "1.1.1" optional = true [target."cfg(unix)".dev-dependencies.libc] -version = "0.2.145" +version = "0.2.149" [target."cfg(unix)".dev-dependencies.nix] -version = "0.26" +version = "0.27.1" features = [ "fs", "socket", diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 19384b7..069bb13 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -122,8 +122,8 @@ libc = { version = "0.2.145", optional = true } signal-hook-registry = { version = "1.1.1", optional = true } [target.'cfg(unix)'.dev-dependencies] -libc = { version = "0.2.145" } -nix = { version = "0.26", default-features = false, features = ["fs", "socket"] } +libc = { version = "0.2.149" } +nix = { version = "0.27.1", default-features = false, features = ["fs", "socket"] } [target.'cfg(windows)'.dependencies.windows-sys] version = "0.48" diff --git a/tests/io_async_fd.rs b/tests/io_async_fd.rs index 7abd592..49b5a68 100644 --- a/tests/io_async_fd.rs +++ b/tests/io_async_fd.rs @@ -1,7 +1,7 @@ #![warn(rust_2018_idioms)] #![cfg(all(unix, feature = "full"))] -use std::os::unix::io::{AsRawFd, RawFd}; +use std::os::unix::io::{AsRawFd, IntoRawFd, RawFd}; use std::sync::{ atomic::{AtomicBool, Ordering}, Arc, @@ -132,7 +132,14 @@ fn socketpair() -> (FileDescriptor, FileDescriptor) { SockFlag::empty(), ) .expect("socketpair"); - let fds = (FileDescriptor { fd: fd_a }, FileDescriptor { fd: fd_b }); + let fds = ( + FileDescriptor { + fd: fd_a.into_raw_fd(), + }, + FileDescriptor { + fd: fd_b.into_raw_fd(), + }, + ); set_nonblocking(fds.0.fd); set_nonblocking(fds.1.fd); |