From 85112fefa56cfc125df46b171f154ad44e4e6c3a Mon Sep 17 00:00:00 2001 From: David Hewitt <1939362+davidhewitt@users.noreply.github.com> Date: Sun, 22 Dec 2019 11:02:56 +0000 Subject: [PATCH] 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. --- alacritty_terminal/src/tty/windows/winpty.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/alacritty_terminal/src/tty/windows/winpty.rs b/alacritty_terminal/src/tty/windows/winpty.rs index 56ee34a1..4ab4d059 100644 --- a/alacritty_terminal/src/tty/windows/winpty.rs +++ b/alacritty_terminal/src/tty/windows/winpty.rs @@ -81,20 +81,6 @@ pub fn new(config: &Config, size: &SizeInfo, _window_id: Option) -> ); }; - 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();