Skip to content

Commit 8726796

Browse files
stlankeskennytm
andauthored
Improving the readability
Co-authored-by: kennytm <kennytm@gmail.com>
1 parent 4dc4e77 commit 8726796

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

std/src/sys/hermit/mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl<T> Spinlock<T> {
4848
let ticket = self.queue.fetch_add(1, Ordering::SeqCst) + 1;
4949
let mut counter: u16 = 0;
5050
while self.dequeue.load(Ordering::SeqCst) != ticket {
51-
counter = counter + 1;
51+
counter += 1;
5252
if counter < 100 {
5353
hint::spin_loop();
5454
} else {

0 commit comments

Comments
 (0)