diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2020-07-28 13:00:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-28 13:00:55 +0300 |
commit | 6c4e45f3a69c71958e65fae9a15f82d0c5a27742 (patch) | |
tree | 311a32b95b705e9cded8fa2c6f06b297586513fe /alacritty_terminal/src/event_loop.rs | |
parent | b7faa9f4378cf922c44f53a8003731fb0de13670 (diff) | |
download | alacritty-6c4e45f3a69c71958e65fae9a15f82d0c5a27742.tar.gz alacritty-6c4e45f3a69c71958e65fae9a15f82d0c5a27742.zip |
Bump minimum supported Rust version to 1.43.0
Diffstat (limited to 'alacritty_terminal/src/event_loop.rs')
-rw-r--r-- | alacritty_terminal/src/event_loop.rs | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/alacritty_terminal/src/event_loop.rs b/alacritty_terminal/src/event_loop.rs index 43e8a302..035c1e73 100644 --- a/alacritty_terminal/src/event_loop.rs +++ b/alacritty_terminal/src/event_loop.rs @@ -355,26 +355,22 @@ where || token == self.pty.write_token() => { #[cfg(unix)] - { - if UnixReady::from(event.readiness()).is_hup() { - // Don't try to do I/O on a dead PTY. - continue; - } + if UnixReady::from(event.readiness()).is_hup() { + // Don't try to do I/O on a dead PTY. + continue; } if event.readiness().is_readable() { if let Err(err) = self.pty_read(&mut state, &mut buf, pipe.as_mut()) { + // On Linux, a `read` on the master side of a PTY can fail + // with `EIO` if the client side hangs up. In that case, + // just loop back round for the inevitable `Exited` event. + // This sucks, but checking the process is either racy or + // blocking. #[cfg(target_os = "linux")] - { - // On Linux, a `read` on the master side of a PTY can fail - // with `EIO` if the client side hangs up. In that case, - // just loop back round for the inevitable `Exited` event. - // This sucks, but checking the process is either racy or - // blocking. - if err.kind() == ErrorKind::Other { - continue; - } + if err.kind() == ErrorKind::Other { + continue; } error!("Error reading from PTY in event loop: {}", err); |