Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit d6e955f

Browse files
committed
fix typos in new method
1 parent 986c1fc commit d6e955f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

library/std/src/sys/hermit/mutex.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ struct SpinlockGuard<'a, T: ?Sized + 'a> {
3535

3636
impl<T> Spinlock<T> {
3737
pub const fn new(user_data: T) -> Spinlock<T> {
38-
SpinlockGuard { dequeue: &self.dequeue, data: &mut *self.data.get() }
38+
Spinlock {
39+
queue: AtomicUsize::new(0),
40+
dequeue: AtomicUsize::new(1),
41+
data: UnsafeCell::new(user_data),
42+
}
3943
}
4044

4145
#[inline]

0 commit comments

Comments
 (0)