Skip to content

Commit

Permalink
fix os::fd imports that don't exist on 1.65
Browse files Browse the repository at this point in the history
  • Loading branch information
elinorbgr committed Aug 25, 2023
1 parent 2826c61 commit 952820c
Show file tree
Hide file tree
Showing 25 changed files with 35 additions and 35 deletions.
2 changes: 1 addition & 1 deletion wayland-backend/src/client_api.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{
any::Any,
fmt,
os::fd::{BorrowedFd, OwnedFd},
os::unix::io::{BorrowedFd, OwnedFd},
os::unix::{io::RawFd, net::UnixStream},
sync::Arc,
};
Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/rs/client_impl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use std::{
fmt,
os::fd::{BorrowedFd, OwnedFd},
os::unix::io::{BorrowedFd, OwnedFd},
os::unix::{
io::{AsRawFd, RawFd},
net::UnixStream,
Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/rs/server_impl/client.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{
ffi::CString,
os::fd::OwnedFd,
os::unix::io::OwnedFd,
os::unix::{io::RawFd, net::UnixStream},
sync::Arc,
};
Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/rs/server_impl/common_poll.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{
os::fd::{BorrowedFd, OwnedFd},
os::unix::io::{AsRawFd, FromRawFd},
os::unix::io::{BorrowedFd, OwnedFd},
sync::{Arc, Mutex},
};

Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/rs/server_impl/handle.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::{
ffi::CString,
os::fd::OwnedFd,
os::unix::io::OwnedFd,
os::unix::{
io::{AsRawFd, RawFd},
net::UnixStream,
Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/rs/server_impl/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Server-side rust implementation of a Wayland protocol backend
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
use std::{fmt, sync::Arc};

use crate::protocol::{same_interface, Interface, Message};
Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/rs/socket.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Wayland socket manipulation
use std::io::{ErrorKind, IoSlice, IoSliceMut, Result as IoResult};
use std::os::fd::{AsFd, BorrowedFd, OwnedFd};
use std::os::unix::io::{AsFd, BorrowedFd, OwnedFd};
use std::os::unix::io::{AsRawFd, RawFd};
use std::os::unix::net::UnixStream;

Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/rs/wire.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Types and routines used to manipulate arguments from the wire format
use std::os::fd::{BorrowedFd, OwnedFd};
use std::os::unix::io::{BorrowedFd, OwnedFd};
use std::os::unix::io::{FromRawFd, RawFd};
use std::ptr;
use std::{ffi::CStr, os::unix::prelude::AsRawFd};
Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/server_api.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{
ffi::CString,
fmt,
os::fd::{BorrowedFd, OwnedFd},
os::unix::io::{BorrowedFd, OwnedFd},
os::unix::{io::RawFd, net::UnixStream},
sync::Arc,
};
Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/sys/client_impl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use std::{
collections::HashSet,
ffi::CStr,
os::fd::{BorrowedFd, OwnedFd},
os::raw::{c_int, c_void},
os::unix::io::{BorrowedFd, OwnedFd},
os::unix::{
io::{FromRawFd, IntoRawFd, RawFd},
net::UnixStream,
Expand Down
2 changes: 1 addition & 1 deletion wayland-backend/src/sys/server_impl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
use std::{
ffi::{CStr, CString},
os::fd::{BorrowedFd, OwnedFd},
os::raw::{c_int, c_void},
os::unix::io::{BorrowedFd, OwnedFd},
os::unix::{
io::{FromRawFd, IntoRawFd, RawFd},
net::UnixStream,
Expand Down
2 changes: 1 addition & 1 deletion wayland-client/src/conn.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{
env, fmt,
io::ErrorKind,
os::fd::OwnedFd,
os::unix::io::OwnedFd,
os::unix::net::UnixStream,
os::unix::prelude::{AsRawFd, FromRawFd},
path::PathBuf,
Expand Down
2 changes: 1 addition & 1 deletion wayland-client/src/event_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::any::Any;
use std::collections::VecDeque;
use std::convert::Infallible;
use std::marker::PhantomData;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
use std::sync::{atomic::Ordering, Arc, Condvar, Mutex};
use std::task;

Expand Down
2 changes: 1 addition & 1 deletion wayland-client/src/globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
use std::{
fmt,
ops::RangeInclusive,
os::fd::OwnedFd,
os::unix::io::OwnedFd,
sync::{
atomic::{AtomicBool, Ordering},
Arc, Mutex,
Expand Down
2 changes: 1 addition & 1 deletion wayland-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
use std::{
fmt,
hash::{Hash, Hasher},
os::fd::OwnedFd,
os::unix::io::OwnedFd,
os::unix::io::RawFd,
sync::Arc,
};
Expand Down
2 changes: 1 addition & 1 deletion wayland-cursor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ use std::env;
use std::fs::File;
use std::io::{Error as IoError, Read, Result as IoResult, Seek, SeekFrom, Write};
use std::ops::{Deref, Index};
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
use std::sync::Arc;
use std::time::{SystemTime, UNIX_EPOCH};
Expand Down
2 changes: 1 addition & 1 deletion wayland-scanner/src/client_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ fn generate_objects_for(interface: &Interface) -> TokenStream {
#mod_doc
pub mod #mod_name {
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;

use super::wayland_client::{
backend::{
Expand Down
2 changes: 1 addition & 1 deletion wayland-scanner/src/server_gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn generate_objects_for(interface: &Interface) -> TokenStream {
#mod_doc
pub mod #mod_name {
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;

use super::wayland_server::{
backend::{
Expand Down
14 changes: 7 additions & 7 deletions wayland-scanner/tests/scanner_assets/test-client-code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub mod wl_display {
Connection, Dispatch, DispatchError, Proxy, QueueHandle, QueueProxyData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = "global error values\n\nThese errors are global and can be emitted in response to any\nserver request."]
#[repr(u32)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
Expand Down Expand Up @@ -315,7 +315,7 @@ pub mod wl_registry {
Connection, Dispatch, DispatchError, Proxy, QueueHandle, QueueProxyData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this request"]
pub const REQ_BIND_SINCE: u32 = 1u32;
#[doc = r" The wire opcode for this request"]
Expand Down Expand Up @@ -562,7 +562,7 @@ pub mod wl_callback {
Connection, Dispatch, DispatchError, Proxy, QueueHandle, QueueProxyData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this event"]
pub const EVT_DONE_SINCE: u32 = 1u32;
#[doc = r" The wire opcode for this event"]
Expand Down Expand Up @@ -723,7 +723,7 @@ pub mod test_global {
Connection, Dispatch, DispatchError, Proxy, QueueHandle, QueueProxyData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this request"]
pub const REQ_MANY_ARGS_SINCE: u32 = 1u32;
#[doc = r" The wire opcode for this request"]
Expand Down Expand Up @@ -1299,7 +1299,7 @@ pub mod secondary {
Connection, Dispatch, DispatchError, Proxy, QueueHandle, QueueProxyData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this request"]
pub const REQ_DESTROY_SINCE: u32 = 2u32;
#[doc = r" The wire opcode for this request"]
Expand Down Expand Up @@ -1462,7 +1462,7 @@ pub mod tertiary {
Connection, Dispatch, DispatchError, Proxy, QueueHandle, QueueProxyData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this request"]
pub const REQ_DESTROY_SINCE: u32 = 3u32;
#[doc = r" The wire opcode for this request"]
Expand Down Expand Up @@ -1625,7 +1625,7 @@ pub mod quad {
Connection, Dispatch, DispatchError, Proxy, QueueHandle, QueueProxyData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this request"]
pub const REQ_DESTROY_SINCE: u32 = 3u32;
#[doc = r" The wire opcode for this request"]
Expand Down
10 changes: 5 additions & 5 deletions wayland-scanner/tests/scanner_assets/test-server-code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub mod wl_callback {
Dispatch, DispatchError, DisplayHandle, New, Resource, ResourceData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this event"]
pub const EVT_DONE_SINCE: u32 = 1u32;
#[doc = r" The wire opcode for this event"]
Expand Down Expand Up @@ -165,7 +165,7 @@ pub mod test_global {
Dispatch, DispatchError, DisplayHandle, New, Resource, ResourceData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this request"]
pub const REQ_MANY_ARGS_SINCE: u32 = 1u32;
#[doc = r" The wire opcode for this request"]
Expand Down Expand Up @@ -763,7 +763,7 @@ pub mod secondary {
Dispatch, DispatchError, DisplayHandle, New, Resource, ResourceData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this request"]
pub const REQ_DESTROY_SINCE: u32 = 2u32;
#[doc = r" The wire opcode for this request"]
Expand Down Expand Up @@ -912,7 +912,7 @@ pub mod tertiary {
Dispatch, DispatchError, DisplayHandle, New, Resource, ResourceData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this request"]
pub const REQ_DESTROY_SINCE: u32 = 3u32;
#[doc = r" The wire opcode for this request"]
Expand Down Expand Up @@ -1061,7 +1061,7 @@ pub mod quad {
Dispatch, DispatchError, DisplayHandle, New, Resource, ResourceData, Weak,
};
use std::sync::Arc;
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
#[doc = r" The minimal object version supporting this request"]
pub const REQ_DESTROY_SINCE: u32 = 3u32;
#[doc = r" The wire opcode for this request"]
Expand Down
2 changes: 1 addition & 1 deletion wayland-server/src/dispatch.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
use std::sync::Arc;

use wayland_backend::{
Expand Down
2 changes: 1 addition & 1 deletion wayland-server/src/display.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::{
os::fd::{AsFd, BorrowedFd},
os::unix::io::{AsFd, BorrowedFd},
os::unix::net::UnixStream,
sync::Arc,
};
Expand Down
2 changes: 1 addition & 1 deletion wayland-server/src/global.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::os::fd::OwnedFd;
use std::os::unix::io::OwnedFd;
use std::sync::Arc;

use wayland_backend::server::{
Expand Down
2 changes: 1 addition & 1 deletion wayland-server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
use std::{
fmt,
hash::{Hash, Hasher},
os::fd::OwnedFd,
os::unix::io::OwnedFd,
};
use wayland_backend::{
protocol::{Interface, Message},
Expand Down
2 changes: 1 addition & 1 deletion wayland-server/src/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{
ffi::{OsStr, OsString},
fs::{self, File},
io,
os::fd::{AsFd, BorrowedFd},
os::unix::io::{AsFd, BorrowedFd},
os::unix::{
io::{AsRawFd, FromRawFd, RawFd},
net::{UnixListener, UnixStream},
Expand Down

0 comments on commit 952820c

Please sign in to comment.