-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
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
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.