mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-18 00:00:09 +02:00
tokio: update nix dependency to 0.27.1 (#6190)
This commit is contained in:
+1
-1
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user