1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 12:23:46 +03:00

fix into_raw_fd impl

This commit is contained in:
Wez Furlong 2019-03-02 12:22:42 -08:00
parent ce44746a9e
commit 871ce9a6c2

View File

@ -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
}
}