]> git.lizzy.rs Git - rust.git/commitdiff
rename variable
authorRalf Jung <post@ralfj.de>
Sat, 10 Jul 2021 12:14:09 +0000 (14:14 +0200)
committerRalf Jung <post@ralfj.de>
Sat, 10 Jul 2021 12:14:09 +0000 (14:14 +0200)
library/std/src/thread/mod.rs

index 5630904da77b769566b8e9d6aad3f8cefa689a27..9f7e6b95dfb90c0d496eb88ead3679226ed02379 100644 (file)
@@ -999,12 +999,12 @@ fn new() -> ThreadId {
         static mut COUNTER: u64 = 1;
 
         unsafe {
-            let _guard = GUARD.lock();
+            let guard = GUARD.lock();
 
             // If we somehow use up all our bits, panic so that we're not
             // covering up subtle bugs of IDs being reused.
             if COUNTER == u64::MAX {
-                drop(_guard); // in case the panic handler ends up calling `ThreadId::new()`, avoid reentrant lock acquire.
+                drop(guard); // in case the panic handler ends up calling `ThreadId::new()`, avoid reentrant lock acquire.
                 panic!("failed to generate unique thread ID: bitspace exhausted");
             }