Change "writers" to "readers" for Deref. (#346)

pull/347/head
Marijn Schouten 3 years ago committed by GitHub
parent 11f1165e8a
commit c7d8467ca9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -148,7 +148,7 @@ impl<T> Deref for Carton<T> {
fn deref(&self) -> &Self::Target { fn deref(&self) -> &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 borrow the // by the logic in [`Self::new`]. We require readers to borrow the
// Carton, and the lifetime of the return value is elided to the // Carton, and the lifetime of the return value is elided to the
// lifetime of the input. This means the borrow checker will // lifetime of the input. This means the borrow checker will
// enforce that no one can mutate the contents of the Carton until // enforce that no one can mutate the contents of the Carton until

Loading…
Cancel
Save