|
|
@ -162,7 +162,7 @@ impl<T> DerefMut for Carton<T> {
|
|
|
|
fn deref_mut(&mut self) -> &mut Self::Target {
|
|
|
|
fn deref_mut(&mut self) -> &mut Self::Target {
|
|
|
|
unsafe {
|
|
|
|
unsafe {
|
|
|
|
// Safety: The pointer is aligned, initialized, and dereferenceable
|
|
|
|
// Safety: The pointer is aligned, initialized, and dereferenceable
|
|
|
|
// by the logic in [`Self::new]. We require writers to mutably
|
|
|
|
// by the logic in [`Self::new`]. We require writers to mutably
|
|
|
|
// borrow the Carton, and the lifetime of the return value is
|
|
|
|
// borrow the Carton, and the lifetime of the return value is
|
|
|
|
// elided to the lifetime of the input. This means the borrow
|
|
|
|
// elided to the lifetime of the input. This means the borrow
|
|
|
|
// checker will enforce that no one else can access the contents
|
|
|
|
// checker will enforce that no one else can access the contents
|
|
|
|