Skip to content

The Path explanation is slightly wrong #1537

@VincentWo

Description

@VincentWo

Sorry if I bother anyone, I just read the documentation at https://doc.rust-lang.org/rust-by-example/std_misc/path.html and stumbled across this sentence:

Note that a Path is not internally represented as an UTF-8 string, but instead is stored as a vector of bytes (Vec)

This is not quite right: A Path is not stored as a vector of bytes (otherwise converting a str to it would not be costfree), but as an OsStr, so rather a slice of bytes. (An OsStr to be exact, but I don't know whether that's an important distinction to make)

Metadata

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