Skip to content

Commit 4dc9bb1

Browse files
committed
remove link to dup3_raw() since it is not available on all OSes
1 parent 0dec3c8 commit 4dc9bb1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/unistd.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,6 @@ feature! {
429429
/// * [`dup2()`]
430430
/// * [`dup2_raw()`]
431431
/// * [`dup3()`]
432-
/// * [`dup3_raw()`]
433432
#[inline]
434433
pub fn dup<Fd: std::os::fd::AsFd>(oldfd: Fd) -> Result<std::os::fd::OwnedFd> {
435434
use std::os::fd::AsRawFd;
@@ -445,6 +444,7 @@ pub fn dup<Fd: std::os::fd::AsFd>(oldfd: Fd) -> Result<std::os::fd::OwnedFd> {
445444
}
446445

447446
/// Duplicate `fd` with stdin.
447+
#[inline]
448448
pub fn dup2_stdin<Fd: std::os::fd::AsFd>(fd: Fd) -> Result<()> {
449449
use std::os::fd::AsRawFd;
450450
use libc::STDIN_FILENO;
@@ -454,6 +454,7 @@ pub fn dup2_stdin<Fd: std::os::fd::AsFd>(fd: Fd) -> Result<()> {
454454
}
455455

456456
/// Duplicate `fd` with stdout.
457+
#[inline]
457458
pub fn dup2_stdout<Fd: std::os::fd::AsFd>(fd: Fd) -> Result<()> {
458459
use std::os::fd::AsRawFd;
459460
use libc::STDOUT_FILENO;
@@ -463,6 +464,7 @@ pub fn dup2_stdout<Fd: std::os::fd::AsFd>(fd: Fd) -> Result<()> {
463464
}
464465

465466
/// Duplicate `fd` with stderr.
467+
#[inline]
466468
pub fn dup2_stderr<Fd: std::os::fd::AsFd>(fd: Fd) -> Result<()> {
467469
use std::os::fd::AsRawFd;
468470
use libc::STDERR_FILENO;
@@ -478,7 +480,8 @@ pub fn dup2_stderr<Fd: std::os::fd::AsFd>(fd: Fd) -> Result<()> {
478480
/// more detail on the exact behavior of this function.
479481
///
480482
/// This function does not allow you to duplicate `oldfd` with any file descriptor
481-
/// you want, to do that, use [`dup2_raw()`].
483+
/// you want, to do that, use [`dup2_raw()`]#[inline]
484+
.
482485
///
483486
/// # Reference
484487
///

0 commit comments

Comments
 (0)