aboutsummaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/tty/unix.rs
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-07-28 13:00:55 +0300
committerGitHub <noreply@github.com>2020-07-28 13:00:55 +0300
commit6c4e45f3a69c71958e65fae9a15f82d0c5a27742 (patch)
tree311a32b95b705e9cded8fa2c6f06b297586513fe /alacritty_terminal/src/tty/unix.rs
parentb7faa9f4378cf922c44f53a8003731fb0de13670 (diff)
downloadalacritty-6c4e45f3a69c71958e65fae9a15f82d0c5a27742.tar.gz
alacritty-6c4e45f3a69c71958e65fae9a15f82d0c5a27742.zip
Bump minimum supported Rust version to 1.43.0
Diffstat (limited to 'alacritty_terminal/src/tty/unix.rs')
-rw-r--r--alacritty_terminal/src/tty/unix.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/alacritty_terminal/src/tty/unix.rs b/alacritty_terminal/src/tty/unix.rs
index b373ada2..3998d9e6 100644
--- a/alacritty_terminal/src/tty/unix.rs
+++ b/alacritty_terminal/src/tty/unix.rs
@@ -1,6 +1,7 @@
//! TTY related functionality.
use std::borrow::Cow;
+#[cfg(not(target_os = "macos"))]
use std::env;
use std::ffi::CStr;
use std::fs::File;
@@ -148,12 +149,10 @@ pub fn new<C>(config: &Config<C>, size: &SizeInfo, window_id: Option<usize>) ->
let (master, slave) = make_pty(size.to_winsize());
#[cfg(any(target_os = "linux", target_os = "macos"))]
- {
- if let Ok(mut termios) = termios::tcgetattr(master) {
- // Set character encoding to UTF-8.
- termios.input_flags.set(InputFlags::IUTF8, true);
- let _ = termios::tcsetattr(master, SetArg::TCSANOW, &termios);
- }
+ if let Ok(mut termios) = termios::tcgetattr(master) {
+ // Set character encoding to UTF-8.
+ termios.input_flags.set(InputFlags::IUTF8, true);
+ let _ = termios::tcsetattr(master, SetArg::TCSANOW, &termios);
}
let mut buf = [0; 1024];