Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library/std/src/sys/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pub mod io;
pub mod net;
pub mod os_str;
pub mod path;
pub mod pipe;
pub mod platform_version;
pub mod process;
pub mod random;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/hermit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ use crate::sys::env;

pub mod futex;
pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
pub mod time;

pub fn unsupported<T>() -> crate::io::Result<T> {
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/sgx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ use crate::sync::atomic::{Atomic, AtomicBool, Ordering};
pub mod abi;
mod libunwind_integration;
pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
pub mod thread_parking;
pub mod time;
pub mod waitqueue;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/solid/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ pub mod itron {
// `crate::sys::error`
pub(crate) mod error;
pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
pub use self::itron::thread_parking;
pub mod time;

Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/teeos/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#![allow(dead_code)]

pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
#[allow(non_upper_case_globals)]
#[path = "../unix/time.rs"]
pub mod time;
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/trusty/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
mod common;
#[path = "../unsupported/os.rs"]
pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
#[path = "../unsupported/thread.rs"]
pub mod thread;
#[path = "../unsupported/time.rs"]
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/uefi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

pub mod helpers;
pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
pub mod time;

#[cfg(test)]
Expand Down
1 change: 0 additions & 1 deletion library/std/src/sys/pal/unix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub mod kernel_copy;
#[cfg(target_os = "linux")]
pub mod linux;
pub mod os;
pub mod pipe;
pub mod stack_overflow;
pub mod sync;
pub mod thread_parking;
Expand Down
1 change: 0 additions & 1 deletion library/std/src/sys/pal/unsupported/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#![deny(unsafe_op_in_unsafe_fn)]

pub mod os;
pub mod pipe;
pub mod thread;
pub mod time;

Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/wasip1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
pub mod futex;

pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
pub mod time;

#[path = "../unsupported/common.rs"]
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/wasip2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ pub mod futex;

#[path = "../wasip1/os.rs"]
pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
pub mod time;

#[path = "../unsupported/common.rs"]
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/wasm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

#[path = "../unsupported/os.rs"]
pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
#[path = "../unsupported/time.rs"]
pub mod time;

Expand Down
1 change: 0 additions & 1 deletion library/std/src/sys/pal/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pub mod c;
pub mod futex;
pub mod handle;
pub mod os;
pub mod pipe;
pub mod time;
cfg_select! {
not(target_vendor = "uwp") => {
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/xous/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
use crate::os::xous::ffi::exit;

pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
pub mod time;

#[path = "../unsupported/common.rs"]
Expand Down
2 changes: 0 additions & 2 deletions library/std/src/sys/pal/zkvm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ pub const WORD_SIZE: usize = size_of::<u32>();

pub mod abi;
pub mod os;
#[path = "../unsupported/pipe.rs"]
pub mod pipe;
#[path = "../unsupported/thread.rs"]
pub mod thread;
#[path = "../unsupported/time.rs"]
Expand Down
18 changes: 18 additions & 0 deletions library/std/src/sys/pipe/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//! Platform-dependent pipe abstraction.

#![forbid(unsafe_op_in_unsafe_fn)]

cfg_select! {
unix => {
mod unix;
pub use self::unix::*;
}
windows => {
mod windows;
pub use self::windows::*;
}
_ => {
mod unsupported;
pub use self::unsupported::*;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl IntoRawFd for AnonPipe {

impl FromRawFd for AnonPipe {
unsafe fn from_raw_fd(raw_fd: RawFd) -> Self {
Self(FromRawFd::from_raw_fd(raw_fd))
Self(unsafe { FromRawFd::from_raw_fd(raw_fd) })
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(nonstandard_style)]

use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut};
use crate::ops::Neg;
use crate::os::windows::prelude::*;
Expand Down
Loading