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

Examples of PathBuf #1260

Closed
adamchalmers opened this issue Sep 18, 2019 · 0 comments · Fixed by #1519
Closed

Examples of PathBuf #1260

adamchalmers opened this issue Sep 18, 2019 · 0 comments · Fixed by #1519

Comments

@adamchalmers
Copy link
Contributor

adamchalmers commented Sep 18, 2019

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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants