diff options
| author | Stefan Lankes <stlankes@users.noreply.github.com> | 2021-11-24 21:12:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-24 21:12:56 +0100 |
| commit | 6911af9d06ef4f92659326ce426c6aefc7b47282 (patch) | |
| tree | 9845ee02e9cc4811badbe3ee9328e7909b5c0034 | |
| parent | 644b445428845a4e662c15059193dfa492bc0c44 (diff) | |
| download | rust-6911af9d06ef4f92659326ce426c6aefc7b47282.tar.gz rust-6911af9d06ef4f92659326ce426c6aefc7b47282.zip | |
Improving the readability
Co-authored-by: kennytm <kennytm@gmail.com>
| -rw-r--r-- | library/std/src/sys/hermit/mutex.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/hermit/mutex.rs b/library/std/src/sys/hermit/mutex.rs index 79692ef2442..415cbba101c 100644 --- a/library/std/src/sys/hermit/mutex.rs +++ b/library/std/src/sys/hermit/mutex.rs @@ -48,7 +48,7 @@ impl<T> Spinlock<T> { let ticket = self.queue.fetch_add(1, Ordering::SeqCst) + 1; let mut counter: u16 = 0; while self.dequeue.load(Ordering::SeqCst) != ticket { - counter = counter + 1; + counter += 1; if counter < 100 { hint::spin_loop(); } else { |
