Fix windows build
This commit is contained in:
parent
996ced4bec
commit
5ad2b73092
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -367,6 +367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
name = "nvim-gtk"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"atty 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"cairo-rs 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"env_logger 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"gdk 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@ -379,7 +380,6 @@ dependencies = [
|
||||
"gtk-sys 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"htmlescape 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"libc 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"neovim-lib 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"pango 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
@ -43,7 +43,7 @@ serde_derive = "1.0"
|
||||
toml = "0.4"
|
||||
serde_json = "1.0"
|
||||
|
||||
libc = "0.2"
|
||||
atty = "0.2"
|
||||
|
||||
#[dependencies.neovim-lib]
|
||||
#git = "https://github.com/daa84/neovim-lib"
|
||||
|
@ -28,7 +28,7 @@ extern crate rmpv;
|
||||
extern crate unicode_segmentation;
|
||||
extern crate unicode_width;
|
||||
|
||||
extern crate libc;
|
||||
extern crate atty;
|
||||
extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
@ -175,9 +175,7 @@ where
|
||||
}
|
||||
|
||||
fn read_piped_input() -> Option<String> {
|
||||
let isatty = unsafe { libc::isatty(libc::STDIN_FILENO) != 0 };
|
||||
|
||||
if !isatty {
|
||||
if atty::isnt(atty::Stream::Stdin) {
|
||||
let mut buf = String::new();
|
||||
match std::io::stdin().read_to_string(&mut buf) {
|
||||
Ok(_) => Some(buf),
|
||||
|
Loading…
Reference in New Issue
Block a user