Skip to content

Switch to using std::ascii::escape_default#39

Open
Pr0methean wants to merge 2 commits intonjaard:masterfrom
Pr0methean:patch-1
Open

Switch to using std::ascii::escape_default#39
Pr0methean wants to merge 2 commits intonjaard:masterfrom
Pr0methean:patch-1

Conversation

@Pr0methean
Copy link

This will escape all non-ASCII bytes, rather than just the allowlisted special characters.

This will escape all non-ASCII bytes, rather than just the allowlisted special characters.
@njaard
Copy link
Owner

njaard commented Jun 5, 2024

Hi @Pr0methean and thank you for your contribution.

Can you explain why you would like to make this change?

Also, it seems like it will have a significant performance by having to allocate for the collect every time.

@Pr0methean
Copy link
Author

The idea is that it'll be possible to print an escape string with only ASCII characters, meaning it can be included in code that's of any 8-bit encoding, and used in contexts such as a cargo fuzz dictionary.

@Pr0methean
Copy link
Author

Also, it seems like it will have a significant performance by having to allocate for the collect every time.

Fixed in 41637aa to no longer allocate explicitly.

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.

2 participants