3 ms·
I hope the tide does turn and then keeps going. I think the language restrictions around Deref(Mut) and Index(Mut) originally borne of purism are just not all t
by ______-_-______ 5y ago
I hope the tide does turn and then keeps going. I think the language restrictions around Deref(Mut) and Index(Mut) originally borne of purism are just not all that helpful in practice. I can make a network request in my Deref impl, but I can't return a smart pointer?
- Kinrany 5y agoThe danger with DerefMut is that one may accidentally allow violating the type's invariant. Same with Deref when interior mutability is present.