fix unused import warning on windows
This commit is contained in:
@@ -23,7 +23,7 @@ use std::fmt::Debug;
|
||||
use std::fs::{File, OpenOptions};
|
||||
use std::hash::Hash;
|
||||
use std::io;
|
||||
use std::io::{Cursor, ErrorKind, IsTerminal, Read, Seek, SeekFrom, Write};
|
||||
use std::io::{Cursor, ErrorKind, Read, Seek, SeekFrom, Write};
|
||||
use std::mem::ManuallyDrop;
|
||||
use std::net::{Shutdown, TcpStream};
|
||||
use std::ops::{Deref, DerefMut};
|
||||
@@ -657,6 +657,8 @@ impl Stream {
|
||||
|
||||
#[inline]
|
||||
pub fn stdin(arena: &mut Arena, add_history: bool) -> Stream {
|
||||
#[cfg(unix)]
|
||||
use std::io::IsTerminal;
|
||||
#[cfg(unix)]
|
||||
if !std::io::stdin().is_terminal() {
|
||||
use std::os::unix::io::{FromRawFd, RawFd};
|
||||
|
||||
Reference in New Issue
Block a user