rust-highfive · GitHub

Merged

@behnam

@behnam

Create named struct `UnicodeVersion` to use instead of tuple type for
`UNICODE_VERSION` value. This allows user to access the fields with
meaningful field names: `major`, `minor`, and `micro`.
Per request, an empty private field is added to the struct, so it can be
extended in the future without API breakage.

@behnam

Open

bors added a commit that referenced this pull request

Aug 8, 2017
[libstd_unicode] Change UNICODE_VERSION to use u32
Looks like there's no strong reason to keep these values at `u64`.
With the current plans for the Unicode Standard, `u8` should be enough for the next 200 years. To stay on the safe side, I'm using `u16` here. I don't see a reason to go with anything machine-dependent/more-efficient.

@bors

@behnam

behnam added a commit to behnam/rust that referenced this pull request

Sep 19, 2017
In <rust-lang#42998>, we added an
uninstantiable type for the internal `UNICODE_VERSION` value,
`UnicodeVersion`, but it was not made public to the outside of the
crate, resulting in the value becoming less useful. Here we make the
type accessible from the outside.
Also add a run-pass test to make sure the type and value can be accessed
as intended.

Merged

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request

Sep 19, 2017
[libstd_unicode] Expose UnicodeVersion type
In <rust-lang#42998>, we added an
uninstantiable type for the internal `UNICODE_VERSION` value,
`UnicodeVersion`, but it was not made public to the outside of the
crate, resulting in the value becoming less useful. Here we make the
type accessible from the outside.
Also add a run-pass test to make sure the type and value can be accessed
as intended.

Closed

Read the original on github.com ↗