make OwnRef covariant
while it references the memory the value itself is owned, so that’s the right thing
This commit is contained in:
parent
fc57085534
commit
8004044789
|
|
@ -5,7 +5,7 @@ use std::{
|
|||
ptr::NonNull,
|
||||
};
|
||||
|
||||
pub struct OwnRef<'a, T: ?Sized>(Option<NonNull<T>>, PhantomData<&'a mut T>);
|
||||
pub struct OwnRef<'a, T: ?Sized>(Option<NonNull<T>>, PhantomData<(&'a mut [u8], T)>);
|
||||
|
||||
impl<T: ?Sized> Drop for OwnRef<'_, T> {
|
||||
fn drop(&mut self) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user