Skip to content

Commit

Permalink
std: fix registering of Windows TLS destructors
Browse files Browse the repository at this point in the history
  • Loading branch information
joboet committed Oct 5, 2023
1 parent b18990b commit 7953b56
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/windows/thread_local_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ unsafe fn run_keyless_dtors() {
// the case that this loop always terminates because we provide the
// guarantee that a TLS key cannot be set after it is flagged for
// destruction.
while let Some((ptr, dtor)) = DESTRUCTORS.borrow_mut().pop() {
while let Some((ptr, dtor)) = { DESTRUCTORS.borrow_mut().pop() } {
(dtor)(ptr);
}
// We're done so free the memory.
Expand Down

0 comments on commit 7953b56

Please sign in to comment.