-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
std::path::Path::Display allocates internally #38879
Comments
I would like to try this out 😄 |
So I've done some digging. The allocation comes from However, I am a little confused by what you mean about "having the lossy conversion use |
I think that's what I mean? You'll need to loop through the bytes and get valid |
Some more questions:
Or is there some hidden thing I haven't seen yet? |
The |
Avoid allocations in Display for OsStr and Path #38879
It should be possible to display a
Path
without doing any additional allocations, by having the lossy conversion useFormatter
directly.The text was updated successfully, but these errors were encountered: