Rollup merge of #71020 - pyfisch:unicode-version, r=sfackler

Store UNICODE_VERSION as a tuple

Remove the UnicodeVersion struct containing
major, minor and update fields and replace it with
a 3-tuple containing the version number.
As the value of each field is limited to 255
use u8 to store them.
This commit is contained in:
Dylan DPC 2020-04-11 17:52:13 +02:00 committed by GitHub
commit b794cb262f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 33 deletions

View file

@ -7,6 +7,6 @@ pub fn main() {
check(std::char::UNICODE_VERSION);
}
pub fn check(unicode_version: std::char::UnicodeVersion) {
assert!(unicode_version.major >= 10);
pub fn check(unicode_version: (u8, u8, u8)) {
assert!(unicode_version.0 >= 10);
}