Skip to content

Commit ba60d83

Browse files
committed
Fix doctest.
1 parent 5c858a6 commit ba60d83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/process.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ use std::{thread, time};
4242
/// # fn main() {
4343
///
4444
/// let mut process = PtyProcess::new(Command::new("cat")).expect("could not execute cat");
45-
/// let fd = dup(process.pty.as_raw_fd()).unwrap();
46-
/// let f = unsafe { File::from_raw_fd(fd) };
45+
/// let fd = dup(&process.pty).unwrap();
46+
/// let f = File::from(fd);
4747
/// let mut writer = LineWriter::new(&f);
4848
/// let mut reader = BufReader::new(&f);
4949
/// process.exit().expect("could not terminate process");

0 commit comments

Comments
 (0)