diff --git a/Cargo.lock b/Cargo.lock index 9e34a3d..1b779df 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -80,7 +80,6 @@ dependencies = [ "ctrlc 3.0.3 (registry+https://github.com/rust-lang/crates.io-index)", "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "ignore 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (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.34 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 40e1d73..eb10536 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,8 +46,7 @@ ctrlc = "3.0" libc = "0.2" [target.'cfg(windows)'.dependencies] -kernel32-sys = "0.2" -winapi = "0.3" +winapi = { version = "0.3", features = ["handleapi", "consoleapi", "processenv"] } [dev-dependencies] diff = "0.1" diff --git a/src/windows.rs b/src/windows.rs index d728461..91a2f58 100644 --- a/src/windows.rs +++ b/src/windows.rs @@ -6,11 +6,12 @@ // notice may not be copied, modified, or distributed except // according to those terms. -extern crate kernel32; extern crate winapi; -use self::kernel32::{GetStdHandle, GetConsoleMode, SetConsoleMode}; -use self::winapi::{STD_OUTPUT_HANDLE, INVALID_HANDLE_VALUE}; +use self::winapi::um::processenv::GetStdHandle; +use self::winapi::um::consoleapi::{GetConsoleMode, SetConsoleMode}; +use self::winapi::um::winbase::STD_OUTPUT_HANDLE; +use self::winapi::um::handleapi::INVALID_HANDLE_VALUE; const ENABLE_VIRTUAL_TERMINAL_PROCESSING: u32 = 0x0004;