We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e22a0d commit 1cd522fCopy full SHA for 1cd522f
std/src/sys_common/thread_info.rs
@@ -39,6 +39,9 @@ pub fn stack_guard() -> Option<Guard> {
39
}
40
41
pub fn set(stack_guard: Option<Guard>, thread: Thread) {
42
- THREAD_INFO.with(|c| rtassert!(c.borrow().is_none()));
43
- THREAD_INFO.with(move |c| *c.borrow_mut() = Some(ThreadInfo { stack_guard, thread }));
+ THREAD_INFO.with(move |thread_info| {
+ let mut thread_info = thread_info.borrow_mut();
44
+ rtassert!(thread_info.is_none());
45
+ *thread_info = Some(ThreadInfo { stack_guard, thread });
46
+ });
47
0 commit comments