Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Path explanation is slightly wrong #1537

Closed
VincentWo opened this issue May 6, 2022 · 2 comments · Fixed by #1625
Closed

The Path explanation is slightly wrong #1537

VincentWo opened this issue May 6, 2022 · 2 comments · Fixed by #1625

Comments

@VincentWo
Copy link

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)

@marioidival
Copy link
Member

Hello @VincentWo how are you? Feel free to open a PR to fix that!

@Spoonbender
Copy link
Contributor

Submitted PR

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

Successfully merging a pull request may close this issue.

3 participants