fix unused import warning on windows

This commit is contained in:
Skgland
2026-04-22 22:42:35 +02:00
parent ff293a56e6
commit 6765921666

View File

@@ -23,7 +23,7 @@ use std::fmt::Debug;
use std::fs::{File, OpenOptions}; use std::fs::{File, OpenOptions};
use std::hash::Hash; use std::hash::Hash;
use std::io; 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::mem::ManuallyDrop;
use std::net::{Shutdown, TcpStream}; use std::net::{Shutdown, TcpStream};
use std::ops::{Deref, DerefMut}; use std::ops::{Deref, DerefMut};
@@ -657,6 +657,8 @@ impl Stream {
#[inline] #[inline]
pub fn stdin(arena: &mut Arena, add_history: bool) -> Stream { pub fn stdin(arena: &mut Arena, add_history: bool) -> Stream {
#[cfg(unix)]
use std::io::IsTerminal;
#[cfg(unix)] #[cfg(unix)]
if !std::io::stdin().is_terminal() { if !std::io::stdin().is_terminal() {
use std::os::unix::io::{FromRawFd, RawFd}; use std::os::unix::io::{FromRawFd, RawFd};