Skip to content

Commit

Permalink
fix: import correct HANDLE
Browse files Browse the repository at this point in the history
  • Loading branch information
ecyrbe committed Mar 1, 2020
1 parent 44b9bbf commit 947653f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/priority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use winapi::shared::ntdef::NULL;
use winapi::um::handleapi::CloseHandle;
#[cfg(windows)]
use winapi::um::processthreadsapi::{
GetCurrentProcess, GetPriorityClass, OpenProcess, SetPriorityClass, HANDLE,
GetCurrentProcess, GetPriorityClass, OpenProcess, SetPriorityClass,
};
#[cfg(windows)]
use winapi::um::winbase::{
Expand All @@ -22,6 +22,8 @@ use winapi::um::winbase::{
REALTIME_PRIORITY_CLASS,
};
#[cfg(windows)]
use winapi::um::winnt::HANDLE;
#[cfg(windows)]
use winapi::um::winnt::PROCESS_QUERY_LIMITED_INFORMATION;
#[cfg(target_os = "macos")]
#[allow(non_camel_case_types)]
Expand Down Expand Up @@ -133,7 +135,7 @@ mod tests {
get_priority(0).expect("Should get priority");
}

#[test]
#[test]
fn test_set_current_process_priority_to_low() {
set_priority(0, PRIORITY_LOW).expect("Should set priority");
let priority = get_priority(0).expect("Should get priority");
Expand Down

0 comments on commit 947653f

Please sign in to comment.