Skip to content

Commit f57e125

Browse files
committed
Windows: Replace GetThreadId+GetCurrentThread with GetCurrentThreadId
Reference: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getcurrentthreadid
1 parent be00ea1 commit f57e125

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/pal/windows/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl Thread {
129129

130130
pub(crate) fn current_os_id() -> Option<u64> {
131131
// SAFETY: FFI call with no preconditions.
132-
let id: u32 = unsafe { c::GetThreadId(c::GetCurrentThread()) };
132+
let id: u32 = unsafe { c::GetCurrentThreadId() };
133133

134134
// A return value of 0 indicates failed lookup.
135135
if id == 0 { None } else { Some(id.into()) }

0 commit comments

Comments
 (0)