about summary refs log tree commit diff
path: root/src/libstd_unicode
diff options
context:
space:
mode:
authorBehnam Esfahbod <behnam@zwnj.org>2017-06-30 17:23:55 -0600
committerBehnam Esfahbod <behnam@zwnj.org>2017-07-21 11:59:23 -0600
commit7ebb6eedca28995ab12ac9e87a2785474ca226c6 (patch)
tree1df7e678393da2cd3c7570bfc88c6abd9cedd1a1 /src/libstd_unicode
parentd361efac2639fa9dd7f6195e4276a728b8875d7a (diff)
downloadrust-7ebb6eedca28995ab12ac9e87a2785474ca226c6.tar.gz
rust-7ebb6eedca28995ab12ac9e87a2785474ca226c6.zip
[libstd_unicode] Change UNICODE_VERSION to use u32
Use `u32` for version components, as `u64` is just an overkill, and
`u32` is the default type for integers and the default type used for
regular internal numbers.

There's no expectation for Unicode Versions to even reach one thousand
in the next hundered years. This is different from *package versions*,
which may become something auto-generated and exceed human-friendly
range of integer values.
Diffstat (limited to 'src/libstd_unicode')
-rw-r--r--src/libstd_unicode/tables.rs2
-rwxr-xr-xsrc/libstd_unicode/unicode.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd_unicode/tables.rs b/src/libstd_unicode/tables.rs
index 0938738b52c..63ed5398872 100644
--- a/src/libstd_unicode/tables.rs
+++ b/src/libstd_unicode/tables.rs
@@ -14,7 +14,7 @@
 
 /// The version of [Unicode](http://www.unicode.org/)
 /// that the unicode parts of `CharExt` and `UnicodeStrPrelude` traits are based on.
-pub const UNICODE_VERSION: (u64, u64, u64) = (10, 0, 0);
+pub const UNICODE_VERSION: (u32, u32, u32) = (10, 0, 0);
 
 
 // BoolTrie is a trie for representing a set of Unicode codepoints. It is
diff --git a/src/libstd_unicode/unicode.py b/src/libstd_unicode/unicode.py
index 5f9def02c7d..5b921a946d1 100755
--- a/src/libstd_unicode/unicode.py
+++ b/src/libstd_unicode/unicode.py
@@ -562,7 +562,7 @@ if __name__ == "__main__":
         rf.write("""
 /// The version of [Unicode](http://www.unicode.org/)
 /// that the unicode parts of `CharExt` and `UnicodeStrPrelude` traits are based on.
-pub const UNICODE_VERSION: (u64, u64, u64) = (%s, %s, %s);
+pub const UNICODE_VERSION: (u32, u32, u32) = (%s, %s, %s);
 """ % unicode_version)
         (canon_decomp, compat_decomp, gencats, combines,
                 to_upper, to_lower, to_title) = load_unicode_data("UnicodeData.txt")