refactor: import FD traits from std instead of rustix

Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
This commit is contained in:
Martin Kröning
2024-10-09 18:57:28 +02:00
parent 582d27351a
commit 939d216027
6 changed files with 7 additions and 9 deletions

View File

@@ -24,8 +24,8 @@ use {
rosenpass_util::fd::claim_fd,
rosenpass_wireguard_broker::brokers::mio_client::MioBrokerClient,
rosenpass_wireguard_broker::WireguardBrokerMio,
rustix::fd::AsRawFd,
rustix::net::{socketpair, AddressFamily, SocketFlags, SocketType},
std::os::fd::AsRawFd,
std::os::unix::net,
std::process::Command,
std::thread,

View File

@@ -23,7 +23,7 @@ use rosenpass_util::{
mio::WriteWithFileDescriptors,
zerocopy::ZerocopySliceExt,
};
use rustix::fd::{AsFd, AsRawFd};
use std::os::fd::{AsFd, AsRawFd};
use tempfile::TempDir;
use zerocopy::AsBytes;

View File

@@ -1,10 +1,8 @@
//! Utilities for working with file descriptors
use anyhow::bail;
use rustix::{
fd::{AsFd, BorrowedFd, FromRawFd, OwnedFd, RawFd},
io::fcntl_dupfd_cloexec,
};
use rustix::io::fcntl_dupfd_cloexec;
use std::os::fd::{AsFd, BorrowedFd, FromRawFd, OwnedFd, RawFd};
use crate::{mem::Forgetting, result::OkExt};

View File

@@ -1,5 +1,5 @@
use mio::net::{UnixListener, UnixStream};
use rustix::fd::{OwnedFd, RawFd};
use std::os::fd::{OwnedFd, RawFd};
use crate::{
fd::{claim_fd, claim_fd_inplace},

View File

@@ -1,4 +1,4 @@
use rustix::fd::{AsFd, AsRawFd};
use std::os::fd::{AsFd, AsRawFd};
use std::{
borrow::{Borrow, BorrowMut},
cmp::min,

View File

@@ -5,8 +5,8 @@ use rosenpass_to::{ops::copy_slice_least_src, To};
use rosenpass_util::io::{IoResultKindHintExt, TryIoResultKindHintExt};
use rosenpass_util::length_prefix_encoding::decoder::LengthPrefixDecoder;
use rosenpass_util::length_prefix_encoding::encoder::LengthPrefixEncoder;
use rustix::fd::AsFd;
use std::borrow::{Borrow, BorrowMut};
use std::os::fd::AsFd;
use crate::api::client::{
BrokerClient, BrokerClientIo, BrokerClientPollResponseError, BrokerClientSetPskError,