From 60a86eacc4c844a4e5508642275b91cfd8856493 Mon Sep 17 00:00:00 2001 From: Josh Guilfoyle Date: Sun, 30 Jul 2023 12:49:27 -0700 Subject: [PATCH] poll: Fix MSRV by not using std::os::fd --- src/sys/unix/selector/poll.rs | 3 +-- src/sys/unix/waker.rs | 8 +++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/sys/unix/selector/poll.rs b/src/sys/unix/selector/poll.rs index 917052773..ab2eea3c8 100644 --- a/src/sys/unix/selector/poll.rs +++ b/src/sys/unix/selector/poll.rs @@ -8,8 +8,7 @@ use crate::sys::unix::waker::WakerInternal; use crate::{Interest, Token}; use std::collections::HashMap; use std::fmt::{Debug, Formatter}; -use std::os::fd::AsRawFd; -use std::os::unix::io::RawFd; +use std::os::unix::io::{AsRawFd, RawFd}; use std::sync::atomic::AtomicBool; use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::{Arc, Condvar, Mutex}; diff --git a/src/sys/unix/waker.rs b/src/sys/unix/waker.rs index ba78fccbd..b24fd5058 100644 --- a/src/sys/unix/waker.rs +++ b/src/sys/unix/waker.rs @@ -29,7 +29,7 @@ mod fdbased { use crate::sys::Selector; use crate::{Interest, Token}; use std::io; - use std::os::fd::AsRawFd; + use std::os::unix::io::AsRawFd; #[derive(Debug)] pub struct Waker { @@ -71,8 +71,7 @@ pub use self::fdbased::Waker; mod eventfd { use std::fs::File; use std::io::{self, Read, Write}; - use std::os::fd::{AsRawFd, RawFd}; - use std::os::unix::io::FromRawFd; + use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; /// Waker backed by `eventfd`. /// @@ -202,8 +201,7 @@ pub use self::kqueue::Waker; mod pipe { use std::fs::File; use std::io::{self, Read, Write}; - use std::os::fd::{AsRawFd, RawFd}; - use std::os::unix::io::FromRawFd; + use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; /// Waker backed by a unix pipe. ///