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 union type in Char::Reader#decode_char_at #10758

Merged
merged 1 commit into from
May 29, 2021

Conversation

asterite
Copy link
Member

It seems Char::Reader#decode_char_at yielded UInt32 to the block in all cases except for the replacement char. This makes sure no union is produced. I benchmarked this to see if there was any difference in performance but couldn't see a difference. Still, this makes the code slightly easier to understand, I guess.

@straight-shoota straight-shoota added this to the 1.1.0 milestone May 28, 2021
@asterite asterite merged commit 235869b into master May 29, 2021
@asterite asterite deleted the opt/char-reader-avoid-union branch May 29, 2021 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants