I’ve implemented a version of
Rc::make_mut that works with
Rc<[T]>. It does not look like rust code and I am not confident that it is safe (wrong alignment?). I’ve ran valgrind on it, and was ok.
Can you help me with this code?
I think this function is interesting for the general public. The function can be written in terms of
fn clone_content<T>(&Rc<T>) -> Rc<T>. Do you think it can be proposed to be included in std?