mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-01 00:00:10 +02:00
process: Add Debug impls for nondeprecated structs
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user