Re:Show HN: Bolt: A research language with finer-grained con...
by comex on Sunday May 10, 2020 @03:54AM
(#23131014)
split_at_mut is for borrowed references. That's the case where I said it does work out of the box with fields, since you can take mutable references to disjoint fields, and the borrow checker allows it without you having to do anything special. But if you want to take an owned pointer to an object and split it into owned pointers to its subcomponents (which only makes sense with Rc), I don't think the standard library has a way to do that for either fields or arrays.
[ Parent
| on HN ]