unixready not for windows

This commit is contained in:
Dongdong Zhou 2021-10-26 09:22:54 +01:00
parent 9a9673d39b
commit a6f37624b6
1 changed files with 7 additions and 4 deletions

View File

@ -15,9 +15,10 @@
term::SizeInfo,
tty::{self, setup_env, EventedPty, EventedReadWrite},
};
#[cfg(not(windows))]
use mio::unix::UnixReady;
use mio::{
channel::{channel, Receiver, Sender},
unix::UnixReady,
Events, PollOpt, Ready,
};
use serde::{Deserialize, Deserializer, Serialize};
@ -314,6 +315,8 @@ fn set_current(&mut self, new: Option<Writing>) {
}
fn set_locale_environment() {
let locale = locale_config::Locale::global_default().to_string().replace("-", "_");
let locale = locale_config::Locale::global_default()
.to_string()
.replace("-", "_");
std::env::set_var("LC_ALL", locale + ".UTF-8");
}