Skip to content

Map char to char32_t#396

Merged
emilio merged 1 commit intomozilla:masterfrom
adrianwong:char32_t
Oct 4, 2019
Merged

Map char to char32_t#396
emilio merged 1 commit intomozilla:masterfrom
adrianwong:char32_t

Conversation

@adrianwong
Copy link
Copy Markdown
Contributor

Rust's char is 32 bits wide, but wchar_t on Windows is 16. Avoid truncation by mapping char to char32_t.

Fixes #373.

Rust's `char` is 32 bits wide, but `wchar_t` on Windows is 16.
Avoid truncation by mapping `char` to `char32_t`.
Copy link
Copy Markdown
Collaborator

@emilio emilio left a comment

Choose a reason for hiding this comment

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

Thanks, lgtm :)

@emilio emilio merged commit 087d36f into mozilla:master Oct 4, 2019
@adrianwong adrianwong deleted the char32_t branch October 4, 2019 08:52
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.

Rust char is not wchar_t e.g. on Windows

2 participants