Skip to content

Examples of PathBuf #1260

Closed
Closed

Description

RBE doesn't mention PathBuf anywhere. A programmer at my work asked:

"Why PathBuf? Just why generally. I started out using it where I thought it made sense, now I just pass &str. Things like .extension() returning an OsStr mean I just use .ends_with() instead which sort of does the same thing (but not always)"

Steve suggested mentioning that between String is to str as PathBuf is to Path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions