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

Two character encoding fixes #13469

Merged
merged 3 commits into from
Apr 13, 2014
Merged

Two character encoding fixes #13469

merged 3 commits into from
Apr 13, 2014

Conversation

kmcallister
Copy link
Contributor

This fixes two separate issues related to character encoding.

  • Add encode_utf16 to the Char trait, analogous to encode_utf8. &str already supports UTF-16 encoding but only with a heap allocation. Also fix encode_utf8 docs and add tests.
  • Correctly decode non-BMP hex escapes in JSON (json cannot decode non-BMP character escapes #13064).

bors added a commit that referenced this pull request Apr 13, 2014
This fixes two separate issues related to character encoding.

* Add `encode_utf16` to the `Char` trait, analogous to `encode_utf8`.  `&str` already supports UTF-16 encoding but only with a heap allocation.  Also fix `encode_utf8` docs and add tests.

* Correctly decode non-BMP hex escapes in JSON (#13064).
@bors bors closed this Apr 13, 2014
@bors bors merged commit cee9a83 into rust-lang:master Apr 13, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Oct 3, 2024
Convert `&Option<T>` to `Option<&T>`

Run `ref_option` (rust-lang#13336) on the Clippy's own code, quiet a few hits. Per mentioned video, this may actually improve performance as well.  Switch lint to `pedantic`

----

changelog: [`ref_option`]: upgrade lint to `pedantic`
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.

3 participants