Skip to content

Commit 6a57559

Browse files
Update library/std/src/thread/spawnhook.rs
Co-authored-by: waffle <[email protected]>
1 parent 9c666b1 commit 6a57559

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/std/src/thread/spawnhook.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,10 @@ where
9191
{
9292
SPAWN_HOOKS.with(|h| {
9393
let mut hooks = h.take();
94+
let next = hooks.first.take();
9495
hooks.first = Some(Arc::new(SpawnHook {
9596
hook: Box::new(move |thread| Box::new(hook(thread))),
96-
next: hooks.first.take(),
97+
next,
9798
}));
9899
h.set(hooks);
99100
});

0 commit comments

Comments
 (0)