diff --git a/src/pty/unix.rs b/src/pty/unix.rs index ebe99ba4e..1fa44530d 100644 --- a/src/pty/unix.rs +++ b/src/pty/unix.rs @@ -11,6 +11,7 @@ use std::ptr; pub use std::process::{Child, Command, ExitStatus}; +#[derive(Debug)] pub struct OwnedFd { fd: RawFd, } @@ -47,7 +48,9 @@ impl AsRawFd for OwnedFd { impl IntoRawFd for OwnedFd { fn into_raw_fd(self) -> RawFd { - self.fd + let fd = self.fd; + mem::forget(self); + fd } }