Closed jonhoo closed 7 years ago
Just did some reading on https://github.com/Kimundi/owning-ref-rs/pull/15, and it seems like it might be needed, though for safety reasons? This is extremely limiting if you have, say a generic enum
inside an OwningHandle
, because you can't reasonably implement Deref
for it. Following https://github.com/Kimundi/owning-ref-rs/pull/15#issuecomment-262142161, is it better to simply drop the bound?
And, after reading a bit more, it seems like the solution is to always box
the handle of the inner "thing" inside the OwningHandle
.
Unless I'm mistaken, there is no explicit need for
OwningHandle
to require thatH: Deref
. This is only a requirement for theimpl Deref for OwningHandle
, not for the wrapper type in general?