Skip to content

Commit

Permalink
fix: new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Nukesor committed Jun 16, 2024
1 parent 08cdcd3 commit 8b24f79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pueue_lib/src/process_helper/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ fn suspend_thread(tid: u32) {
let thread_handle = OpenThread(THREAD_SUSPEND_RESUME, FALSE, tid);
if thread_handle != NULL {
// If SuspendThread fails, the return value is (DWORD) -1
if u32::max_value() == SuspendThread(thread_handle) {
if u32::MAX == SuspendThread(thread_handle) {
let err_code = GetLastError();
warn!("Failed to suspend thread {tid} with error code {err_code}");
}
Expand All @@ -216,7 +216,7 @@ fn resume_thread(tid: u32) {
let thread_handle = OpenThread(THREAD_SUSPEND_RESUME, FALSE, tid);
if thread_handle != NULL {
// If ResumeThread fails, the return value is (DWORD) -1
if u32::max_value() == ResumeThread(thread_handle) {
if u32::MAX == ResumeThread(thread_handle) {
let err_code = GetLastError();
warn!("Failed to resume thread {tid} with error code {err_code}");
}
Expand Down

0 comments on commit 8b24f79

Please sign in to comment.