Closed chyyuu closed 4 years ago
...... fn force_get<'a>(&'a self) -> &'a T { match unsafe { &*self.data.get() }.as_ref() { None => unsafe { unreachable() }, Some(p) => p, } }
What's the meaning of '&*'? @wangrunji0408
Cast a *mut T to &T. * dereference a raw pointer to an owned value, then & get its ref.
*mut T
&T
*
&
What's the meaning of '&*'? @wangrunji0408