aboutsummaryrefslogtreecommitdiff
path: root/src/tty
diff options
context:
space:
mode:
Diffstat (limited to 'src/tty')
-rw-r--r--src/tty/mod.rs14
-rw-r--r--src/tty/unix.rs14
-rw-r--r--src/tty/windows.rs10
3 files changed, 19 insertions, 19 deletions
diff --git a/src/tty/mod.rs b/src/tty/mod.rs
index faed276d..cedb010e 100644
--- a/src/tty/mod.rs
+++ b/src/tty/mod.rs
@@ -18,7 +18,7 @@ use std::{env, io};
use terminfo::Database;
-use config::Config;
+use crate::config::Config;
#[cfg(not(windows))]
mod unix;
@@ -39,13 +39,13 @@ pub trait EventedReadWrite {
fn register(
&mut self,
- &mio::Poll,
- &mut Iterator<Item = &usize>,
- mio::Ready,
- mio::PollOpt,
+ _: &mio::Poll,
+ _: &mut dyn Iterator<Item = &usize>,
+ _: mio::Ready,
+ _: mio::PollOpt,
) -> io::Result<()>;
- fn reregister(&mut self, &mio::Poll, mio::Ready, mio::PollOpt) -> io::Result<()>;
- fn deregister(&mut self, &mio::Poll) -> io::Result<()>;
+ fn reregister(&mut self, _: &mio::Poll, _: mio::Ready, _: mio::PollOpt) -> io::Result<()>;
+ fn deregister(&mut self, _: &mio::Poll) -> io::Result<()>;
fn reader(&mut self) -> &mut Self::Reader;
fn read_token(&self) -> mio::Token;
diff --git a/src/tty/unix.rs b/src/tty/unix.rs
index a1774d05..b341638f 100644
--- a/src/tty/unix.rs
+++ b/src/tty/unix.rs
@@ -15,11 +15,11 @@
//! tty related functionality
//!
-use tty::EventedReadWrite;
-use term::SizeInfo;
-use display::OnResize;
-use config::{Config, Shell};
-use cli::Options;
+use crate::tty::EventedReadWrite;
+use crate::term::SizeInfo;
+use crate::display::OnResize;
+use crate::config::{Config, Shell};
+use crate::cli::Options;
use mio;
use libc::{self, c_int, pid_t, winsize, SIGCHLD, TIOCSCTTY, WNOHANG};
@@ -149,7 +149,7 @@ struct Passwd<'a> {
/// # Unsafety
///
/// If `buf` is changed while `Passwd` is alive, bad thing will almost certainly happen.
-fn get_pw_entry(buf: &mut [i8; 1024]) -> Passwd {
+fn get_pw_entry(buf: &mut [i8; 1024]) -> Passwd<'_> {
// Create zeroed passwd struct
let mut entry: libc::passwd = unsafe { ::std::mem::uninitialized() };
@@ -329,7 +329,7 @@ impl EventedReadWrite for Pty {
fn register(
&mut self,
poll: &mio::Poll,
- token: &mut Iterator<Item = &usize>,
+ token: &mut dyn Iterator<Item = &usize>,
interest: mio::Ready,
poll_opts: mio::PollOpt,
) -> io::Result<()> {
diff --git a/src/tty/windows.rs b/src/tty/windows.rs
index 44715b39..4895b37d 100644
--- a/src/tty/windows.rs
+++ b/src/tty/windows.rs
@@ -31,11 +31,11 @@ use winapi::shared::winerror::WAIT_TIMEOUT;
use winpty::{ConfigFlags, MouseMode, SpawnConfig, SpawnFlags, Winpty};
use winpty::Config as WinptyConfig;
-use config::{Config, Shell};
-use display::OnResize;
-use cli::Options;
-use tty::EventedReadWrite;
-use term::SizeInfo;
+use crate::config::{Config, Shell};
+use crate::display::OnResize;
+use crate::cli::Options;
+use crate::tty::EventedReadWrite;
+use crate::term::SizeInfo;
/// Handle to the winpty agent process. Required so we know when it closes.
static mut HANDLE: *mut c_void = 0usize as *mut c_void;