diff options
Diffstat (limited to 'alacritty_terminal')
-rw-r--r-- | alacritty_terminal/src/event_loop.rs | 4 | ||||
-rw-r--r-- | alacritty_terminal/src/grid/row.rs | 6 | ||||
-rw-r--r-- | alacritty_terminal/src/tty/unix.rs | 12 | ||||
-rw-r--r-- | alacritty_terminal/src/tty/windows/conpty.rs | 4 |
4 files changed, 9 insertions, 17 deletions
diff --git a/alacritty_terminal/src/event_loop.rs b/alacritty_terminal/src/event_loop.rs index b4c0a5e4..fbd882ad 100644 --- a/alacritty_terminal/src/event_loop.rs +++ b/alacritty_terminal/src/event_loop.rs @@ -15,12 +15,10 @@ use mio::unix::UnixReady; use mio::{self, Events, PollOpt, Ready}; use mio_extras::channel::{self, Receiver, Sender}; -use crate::ansi; use crate::event::{self, Event, EventListener}; use crate::sync::FairMutex; use crate::term::{SizeInfo, Term}; -use crate::thread; -use crate::tty; +use crate::{ansi, thread, tty}; /// Max bytes to read from the PTY before forced terminal synchronization. const READ_BUFFER_SIZE: usize = 0x10_0000; diff --git a/alacritty_terminal/src/grid/row.rs b/alacritty_terminal/src/grid/row.rs index c932e83f..f6bcb022 100644 --- a/alacritty_terminal/src/grid/row.rs +++ b/alacritty_terminal/src/grid/row.rs @@ -1,10 +1,8 @@ //! Defines the Row type which makes up lines in the grid. use std::cmp::{max, min}; -use std::ops::{Index, IndexMut}; -use std::ops::{Range, RangeFrom, RangeFull, RangeTo, RangeToInclusive}; -use std::ptr; -use std::slice; +use std::ops::{Index, IndexMut, Range, RangeFrom, RangeFull, RangeTo, RangeToInclusive}; +use std::{ptr, slice}; use serde::{Deserialize, Serialize}; diff --git a/alacritty_terminal/src/tty/unix.rs b/alacritty_terminal/src/tty/unix.rs index a3c35f95..483333e7 100644 --- a/alacritty_terminal/src/tty/unix.rs +++ b/alacritty_terminal/src/tty/unix.rs @@ -5,15 +5,12 @@ use std::borrow::Cow; use std::env; use std::ffi::CStr; use std::fs::File; -use std::io; use std::mem::MaybeUninit; -use std::os::unix::{ - io::{AsRawFd, FromRawFd, RawFd}, - process::CommandExt, -}; +use std::os::unix::io::{AsRawFd, FromRawFd, RawFd}; +use std::os::unix::process::CommandExt; use std::process::{Child, Command, Stdio}; -use std::ptr; use std::sync::atomic::{AtomicI32, AtomicUsize, Ordering}; +use std::{io, ptr}; use libc::{self, c_int, pid_t, winsize, TIOCSCTTY}; use log::error; @@ -21,7 +18,8 @@ use mio::unix::EventedFd; use nix::pty::openpty; #[cfg(any(target_os = "linux", target_os = "macos"))] use nix::sys::termios::{self, InputFlags, SetArg}; -use signal_hook::{self as sighook, iterator::Signals}; +use signal_hook as sighook; +use signal_hook::iterator::Signals; use crate::config::{Config, Program}; use crate::event::OnResize; diff --git a/alacritty_terminal/src/tty/windows/conpty.rs b/alacritty_terminal/src/tty/windows/conpty.rs index 919bd00f..002022ea 100644 --- a/alacritty_terminal/src/tty/windows/conpty.rs +++ b/alacritty_terminal/src/tty/windows/conpty.rs @@ -1,8 +1,6 @@ -use std::i16; use std::io::Error; -use std::mem; use std::os::windows::io::IntoRawHandle; -use std::ptr; +use std::{i16, mem, ptr}; use mio_anonymous_pipes::{EventedAnonRead, EventedAnonWrite}; use winapi::shared::basetsd::{PSIZE_T, SIZE_T}; |