Skip to content

Commit dbc2b55

Browse files
committed
rename variable
1 parent 2750d3a commit dbc2b55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/thread/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -999,12 +999,12 @@ impl ThreadId {
999999
static mut COUNTER: u64 = 1;
10001000

10011001
unsafe {
1002-
let _guard = GUARD.lock();
1002+
let guard = GUARD.lock();
10031003

10041004
// If we somehow use up all our bits, panic so that we're not
10051005
// covering up subtle bugs of IDs being reused.
10061006
if COUNTER == u64::MAX {
1007-
drop(_guard); // in case the panic handler ends up calling `ThreadId::new()`, avoid reentrant lock acquire.
1007+
drop(guard); // in case the panic handler ends up calling `ThreadId::new()`, avoid reentrant lock acquire.
10081008
panic!("failed to generate unique thread ID: bitspace exhausted");
10091009
}
10101010

0 commit comments

Comments
 (0)