mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
fix typos in new method
This commit is contained in:
parent
986c1fc053
commit
d6e955f3bf
@ -35,7 +35,11 @@ struct SpinlockGuard<'a, T: ?Sized + 'a> {
|
||||
|
||||
impl<T> Spinlock<T> {
|
||||
pub const fn new(user_data: T) -> Spinlock<T> {
|
||||
SpinlockGuard { dequeue: &self.dequeue, data: &mut *self.data.get() }
|
||||
Spinlock {
|
||||
queue: AtomicUsize::new(0),
|
||||
dequeue: AtomicUsize::new(1),
|
||||
data: UnsafeCell::new(user_data),
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
Loading…
Reference in New Issue
Block a user