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:
commit
b794cb262f
6 changed files with 8 additions and 33 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue