Remove unneeded NamedPipe::connect() calls

In the way the code was set up, these calls would always do nothing
and return io::ErrorKind::WouldBlock, so they can be safely removed.
This commit is contained in:
David Hewitt 2019-12-22 11:02:56 +00:00 committed by Christian Duerr
parent 7a957978e4
commit 85112fefa5
1 changed files with 0 additions and 14 deletions

View File

@ -81,20 +81,6 @@ pub fn new<C>(config: &Config<C>, size: &SizeInfo, _window_id: Option<usize>) ->
);
};
if let Some(err) = conout_pipe.connect().err() {
if err.kind() != io::ErrorKind::WouldBlock {
panic!(err);
}
}
assert!(conout_pipe.take_error().unwrap().is_none());
if let Some(err) = conin_pipe.connect().err() {
if err.kind() != io::ErrorKind::WouldBlock {
panic!(err);
}
}
assert!(conin_pipe.take_error().unwrap().is_none());
agent.spawn(&spawnconfig).unwrap();
let child_watcher = ChildExitWatcher::new(agent.raw_handle()).unwrap();