Skip to content

Commit

Permalink
tokio: update nix dependency to 0.27.1 (#6190)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor authored Dec 4, 2023
1 parent ed4f766 commit a0a58d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tokio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ signal-hook-registry = { version = "1.1.1", optional = true }

[target.'cfg(unix)'.dev-dependencies]
libc = { version = "0.2.149" }
nix = { version = "0.26", default-features = false, features = ["fs", "socket"] }
nix = { version = "0.27.1", default-features = false, features = ["fs", "socket"] }

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.48"
Expand Down
11 changes: 9 additions & 2 deletions tokio/tests/io_async_fd.rs
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit a0a58d7

Please sign in to comment.