Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy committed Oct 29, 2023
1 parent 2308af9 commit 71bae42
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ext/node/ops/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,11 @@ pub fn op_node_guess_handle_type(

#[cfg(windows)]
fn guess_handle_type(handle: ResourceHandleFd) -> HandleType {
use winapi::um::consoleapi::GetConsoleMode;
use winapi::um::fileapi::GetFileType;
use winapi::um::winbase::FILE_TYPE_CHAR;
use winapi::um::winbase::FILE_TYPE_DISK;
use winapi::um::winbase::FILE_TYPE_PIPE;

let mut mode = 0;
// SAFETY: Call to win32 fileapi. `handle` is a valid fd.
match unsafe { GetFileType(handle) } {
FILE_TYPE_DISK | FILE_TYPE_CHAR => HandleType::File,
Expand Down

0 comments on commit 71bae42

Please sign in to comment.