Skip to content

Box<str>. Arc<str> and Rc<str> should implement AsRef<[u8]>, AsRef<Path>, AsRef<OsStr>, and FromStr #132138

Open
@Conaclos

Description

@Conaclos

The String and str type implements AsRef<str> and AsRef<[u8]>, AsRef<Path>, and AsRef<OsStr>.
Conversely, Box<str> implements only AsRef<str>.
This looks like a miss of opportunity.

Box<str> should also implement AsRef<[u8]>, AsRef<Path>, AsRef<OsStr>, and FromStr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-inferenceArea: Type inferenceA-trait-systemArea: Trait systemC-feature-requestCategory: 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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions