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

Avoid small allocations when parsing short hex format #18

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

goto-bus-stop
Copy link
Contributor

The .repeat() calls allocate a String, instead it's possible to parse the single digit into an u8 and then repeat the hex value with bitwise operations.

The `.repeat()` calls allocate a `String`, instead it's possible to
parse the single digit into an `u8` and then repeat the hex value with
bitwise operations.
@mazznoer mazznoer merged commit 2be71bf into mazznoer:master Jul 22, 2024
@mazznoer
Copy link
Owner

Thank you

@goto-bus-stop goto-bus-stop deleted the no-repeat branch July 22, 2024 11:18
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