diff options
author | Andrew Walbran <qwandor@google.com> | 2023-12-04 15:09:58 +0000 |
---|---|---|
committer | Andrew Walbran <qwandor@google.com> | 2023-12-05 15:53:07 +0000 |
commit | 3d8df08329ead190fa72186255020bdcb54a177d (patch) | |
tree | ccb23e8ea80a07dc8811e655a0ba75aef69822e9 | |
parent | 5db82bb93be90fc3a907cc0ecfdc35179c6f0afa (diff) | |
download | tokio-3d8df08329ead190fa72186255020bdcb54a177d.tar.gz |
tokio: update nix dependency to 0.27.1 (#6190)
This is a cherry-pick from upstream as it has not been released yet.
Bug: 314091492
Test: m rust
Change-Id: If7d3fe705c8d9d638bafc464a49daee6dea379ab
-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); |