Skip to content

Commit

Permalink
src: remove dependency on the 'kernel32' crate
Browse files Browse the repository at this point in the history
  • Loading branch information
piscisaureus committed Jan 14, 2019
1 parent fda604f commit 69c370c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ main_extern = [
"$rust_build:http",
"$rust_build:hyper",
"$rust_build:hyper_rustls",
"$rust_build:kernel32",
"$rust_build:lazy_static",
"$rust_build:libc",
"$rust_build:log",
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ getopts = "=0.2.18"
http = "=0.1.14"
hyper = "=0.12.19"
hyper-rustls = "=0.15.0"
kernel32-sys = "=0.2.2"
lazy_static = "=1.2.0"
libc = "=0.2.46"
log = "=0.4.6"
Expand Down
5 changes: 1 addition & 4 deletions src/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ use std::os::unix::io::FromRawFd;
#[cfg(windows)]
use std::os::windows::io::FromRawHandle;

#[cfg(windows)]
extern crate kernel32;

#[cfg(windows)]
extern crate winapi;

Expand All @@ -73,7 +70,7 @@ lazy_static! {
let stdout = unsafe { std::fs::File::from_raw_fd(1) };
#[cfg(windows)]
let stdout = unsafe {
std::fs::File::from_raw_handle(kernel32::GetStdHandle(
std::fs::File::from_raw_handle(winapi::um::processenv::GetStdHandle(
winapi::um::winbase::STD_OUTPUT_HANDLE))
};
tokio::fs::File::from_std(stdout)
Expand Down

0 comments on commit 69c370c

Please sign in to comment.