Skip to content

Commit d6943bf

Browse files
committed
Rm unused fn stdio::dup
Signed-off-by: Jiahao XU <[email protected]>
1 parent 7ef47c8 commit d6943bf

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

src/stdio.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,6 @@ use std::process;
1212
use std::task::{Context, Poll};
1313
use tokio::io::{AsyncRead, AsyncWrite, ReadBuf};
1414

15-
pub(crate) unsafe fn dup(raw_fd: RawFd) -> Result<OwnedFd, Error> {
16-
let res = libc::dup(raw_fd);
17-
if res == -1 {
18-
Err(Error::ChildIo(io::Error::last_os_error()))
19-
} else {
20-
// safety: dup returns a valid fd on success.
21-
Ok(OwnedFd::from_raw_fd(res))
22-
}
23-
}
24-
2515
#[derive(Debug)]
2616
pub(crate) enum StdioImpl {
2717
/// Read/Write to /dev/null

0 commit comments

Comments
 (0)