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:
parent
ce44746a9e
commit
871ce9a6c2
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user