1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-11 13:51:01 -05:00

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

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();