Skip to content

Commit f87270a

Browse files
Auto merge of #145412 - tgross35:win-tid, r=<try>
Windows: Replace `GetThreadId`+`GetCurrentThread` with `GetCurrentThreadId` try-job: x86_64-msvc-1 try-job: x86_64-msvc-2
2 parents 898aff7 + f57e125 commit f87270a

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)