mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 21:50:00 -05:00
src: remove dependency on the 'kernel32' crate
This commit is contained in:
parent
fda604ff05
commit
69c370c5cc
3 changed files with 1 additions and 6 deletions
1
BUILD.gn
1
BUILD.gn
|
@ -26,7 +26,6 @@ main_extern = [
|
||||||
"$rust_build:http",
|
"$rust_build:http",
|
||||||
"$rust_build:hyper",
|
"$rust_build:hyper",
|
||||||
"$rust_build:hyper_rustls",
|
"$rust_build:hyper_rustls",
|
||||||
"$rust_build:kernel32",
|
|
||||||
"$rust_build:lazy_static",
|
"$rust_build:lazy_static",
|
||||||
"$rust_build:libc",
|
"$rust_build:libc",
|
||||||
"$rust_build:log",
|
"$rust_build:log",
|
||||||
|
|
|
@ -17,7 +17,6 @@ getopts = "=0.2.18"
|
||||||
http = "=0.1.14"
|
http = "=0.1.14"
|
||||||
hyper = "=0.12.19"
|
hyper = "=0.12.19"
|
||||||
hyper-rustls = "=0.15.0"
|
hyper-rustls = "=0.15.0"
|
||||||
kernel32-sys = "=0.2.2"
|
|
||||||
lazy_static = "=1.2.0"
|
lazy_static = "=1.2.0"
|
||||||
libc = "=0.2.46"
|
libc = "=0.2.46"
|
||||||
log = "=0.4.6"
|
log = "=0.4.6"
|
||||||
|
|
|
@ -54,9 +54,6 @@ use std::os::unix::io::FromRawFd;
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
use std::os::windows::io::FromRawHandle;
|
use std::os::windows::io::FromRawHandle;
|
||||||
|
|
||||||
#[cfg(windows)]
|
|
||||||
extern crate kernel32;
|
|
||||||
|
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
extern crate winapi;
|
extern crate winapi;
|
||||||
|
|
||||||
|
@ -73,7 +70,7 @@ lazy_static! {
|
||||||
let stdout = unsafe { std::fs::File::from_raw_fd(1) };
|
let stdout = unsafe { std::fs::File::from_raw_fd(1) };
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
let stdout = unsafe {
|
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))
|
winapi::um::winbase::STD_OUTPUT_HANDLE))
|
||||||
};
|
};
|
||||||
tokio::fs::File::from_std(stdout)
|
tokio::fs::File::from_std(stdout)
|
||||||
|
|
Loading…
Add table
Reference in a new issue