thin-vec
thin-vec copied to clipboard
Make `Drain<'_, T>` covariant in `T`.
Since we only ever ptr::read from the references returned by self.iter.next(), they can just as well be shared references as mutable ones, so we use Iter instead of IterMut to get covariance. *mut ThinVec<T> becomes NonNull<ThinVec<T>> for covariance also.