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

refac: use BStr to display possibly non-UTF8 byte sequences #332

Merged
merged 2 commits into from
Jan 5, 2023

Conversation

vrmiguel
Copy link
Member

@vrmiguel vrmiguel commented Jan 5, 2023

Uses bstr::BStr to display Paths in the same way that utils::to_utf does (i.e. without quotes and using the Unicode replacement character) but with less cost: without std's UTF-8 check and without heap allocations when the sequence is non-UTF8

to_utf is still used in some places but I aim to remove that in another PR

Copy link
Member

@figsoda figsoda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@figsoda figsoda merged commit 9fdc7ed into main Jan 5, 2023
@figsoda figsoda deleted the bstr-path-display branch January 5, 2023 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants