Open dbeckwith opened 4 years ago
It would be nice to be able to convert OwningRef<&O, T> to OwningRef<O, T> when O: CloneStableAddress. Example:
OwningRef<&O, T>
OwningRef<O, T>
O: CloneStableAddress
impl<O, T> OwningRef<&O, T> where O: CloneStableAddress, { pub fn clone_owner(&self) -> OwningRef<O, T> { // SAFETY: safe because the owner implements CloneStableAddress unsafe { self.map_owner(Clone::clone) } } }
It would be nice to be able to convert
OwningRef<&O, T>
toOwningRef<O, T>
whenO: CloneStableAddress
. Example: