We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c858a6 commit ba60d83Copy full SHA for ba60d83
src/process.rs
@@ -42,8 +42,8 @@ use std::{thread, time};
42
/// # fn main() {
43
///
44
/// 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) };
+/// let fd = dup(&process.pty).unwrap();
+/// let f = File::from(fd);
47
/// let mut writer = LineWriter::new(&f);
48
/// let mut reader = BufReader::new(&f);
49
/// process.exit().expect("could not terminate process");
0 commit comments