process: Add Debug impls for nondeprecated structs

This commit is contained in:
Ivan Petkov
2019-06-24 16:56:50 -07:00
parent 4d11784b01
commit 914b803429
3 changed files with 49 additions and 1 deletions
+11
View File
@@ -19,6 +19,7 @@ extern crate winapi;
extern crate kernel32;
extern crate mio_named_pipes;
use std::fmt;
use std::io;
use std::os::windows::prelude::*;
use std::os::windows::process::ExitStatusExt;
@@ -35,6 +36,16 @@ pub struct Child {
waiting: Option<Waiting>,
}
impl fmt::Debug for Child {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
fmt.debug_struct("Child")
.field("pid", &self.id())
.field("child", &self.child)
.field("waiting", &"..")
.finish()
}
}
struct Waiting {
rx: Fuse<oneshot::Receiver<()>>,
wait_object: winapi::HANDLE,