Skip to content

Path & PathBuf missing FromStr trait #44431

Closed
@mqudsi

Description

@mqudsi

Both std::path::Path and std::path::PathBuf implement std::convert::From<String> but neither one implements the std::str::FromStr trait. Since both Path and PathBuf have infallible conversions from string types, they should implement std::str::FromStr (esp. so that they can be used as generic "convertible from str" types).

Note that if something is done about rust-lang/rfcs#2143, this would be a moot discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-acceptedCategory: A feature request that has been accepted pending implementation.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