1 result · Clear filters · Feed
-
Medium —
`cell-project` used incorrect variance when projecting through `&Cell<T>`
## Overview The issue lies in the implementation of the `cell_project` macro which used `field as *const _` instead of `field as *mut _`. The problem being that `*const T` is covariant in `T` while `*mut T` is invariant in `T`. Keep in mind that `&Cell<T>` is…