Closed
Description
Right now, we have
impl From<&CStr> for Rc<CStr>
impl From<&OsStr> for Rc<OsStr>
impl From<&Path> for Rc<Path>
impl From<&str> for Rc<str>
and their Arc
counterparts.
Even though a mut slice can be coerced into a non-mut one, I think it would be useful to have versions that can directly take &mut _
.
For example, to be able to do something like:
let s: Rc<str> = chr.encode_utf8(&mut [0; 4]).into(); // the trait bound `Rc<str>: From<&mut str>` is not satisfied