Permalink
Browse files

Bump winapi to 0.3

  • Loading branch information...
Eijebong committed Jan 3, 2018
1 parent e99990e commit 031d67f5ba09f13c8d91c4700f93a2a126ceaf44
Showing with 7 additions and 9 deletions.
  1. +1 −2 Cargo.toml
  2. +1 −3 src/lib.rs
  3. +5 −4 src/platform/windows.rs
View
@@ -22,8 +22,7 @@ clippy = { version = "0.0.175", optional = true }
libc = "0.2.20"
[target.'cfg(target_os = "windows")'.dependencies]
kernel32-sys = "0.2.2"
winapi = "0.2.8"
winapi = { version = "0.3", features = ["wincon", "processenv", "winbase"] }
[features]
default = []
View
@@ -49,10 +49,8 @@
#[cfg(not(target_os = "windows"))]
extern crate libc;
#[cfg(target_os = "windows")]
extern crate kernel32;
#[cfg(target_os = "windows")]
extern crate winapi;
// A facade to allow exposing functions depending on the platform
mod platform;
pub use platform::{dimensions, dimensions_stdout, dimensions_stdin, dimensions_stderr};
pub use platform::{dimensions, dimensions_stdout, dimensions_stdin, dimensions_stderr};
View
@@ -1,6 +1,7 @@
use kernel32::{GetConsoleScreenBufferInfo, GetStdHandle};
use winapi::{CONSOLE_SCREEN_BUFFER_INFO, COORD, SMALL_RECT, STD_OUTPUT_HANDLE};
use winapi::um::processenv::GetStdHandle;
use winapi::um::winbase::STD_OUTPUT_HANDLE;
use winapi::um::wincon::GetConsoleScreenBufferInfo;
use winapi::um::wincon::{CONSOLE_SCREEN_BUFFER_INFO, COORD, SMALL_RECT};
/// Query the current processes's output, returning its width and height as a
/// number of characters.
@@ -82,4 +83,4 @@ pub fn dimensions_stdin() -> Option<(usize, usize)> { unimplemented!() }
///
/// This function `panic!`s unconditionally with the `unimplemented!`
/// macro
pub fn dimensions_stderr() -> Option<(usize, usize)> { unimplemented!() }
pub fn dimensions_stderr() -> Option<(usize, usize)> { unimplemented!() }

0 comments on commit 031d67f

Please sign in to comment.