diff options
| author | Josh Stone <jistone@redhat.com> | 2019-07-12 16:28:58 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2019-07-12 16:28:58 -0700 |
| commit | 76128c304d0397b0956a21ffc649a9ef8c444e63 (patch) | |
| tree | 29bb0000e47934e1827ee441f23b34cff33f0a7f | |
| parent | 71f9384e3bec467158a628e2d11e77ffada16a90 (diff) | |
| download | rust-76128c304d0397b0956a21ffc649a9ef8c444e63.tar.gz rust-76128c304d0397b0956a21ffc649a9ef8c444e63.zip | |
Update unicode scripts for the current coding style
| -rw-r--r-- | src/libcore/unicode/printable.py | 6 | ||||
| -rwxr-xr-x | src/libcore/unicode/unicode.py | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/unicode/printable.py b/src/libcore/unicode/printable.py index 1288a784123..748917f1d34 100644 --- a/src/libcore/unicode/printable.py +++ b/src/libcore/unicode/printable.py @@ -111,17 +111,17 @@ def compress_normal(normal): return compressed def print_singletons(uppers, lowers, uppersname, lowersname): - print("const {}: &'static [(u8, u8)] = &[".format(uppersname)) + print("const {}: &[(u8, u8)] = &[".format(uppersname)) for u, c in uppers: print(" ({:#04x}, {}),".format(u, c)) print("];") - print("const {}: &'static [u8] = &[".format(lowersname)) + print("const {}: &[u8] = &[".format(lowersname)) for i in range(0, len(lowers), 8): print(" {}".format(" ".join("{:#04x},".format(l) for l in lowers[i:i+8]))) print("];") def print_normal(normal, normalname): - print("const {}: &'static [u8] = &[".format(normalname)) + print("const {}: &[u8] = &[".format(normalname)) for v in normal: print(" {}".format(" ".join("{:#04x},".format(i) for i in v))) print("];") diff --git a/src/libcore/unicode/unicode.py b/src/libcore/unicode/unicode.py index a0539cd9ca9..3a20d0548c1 100755 --- a/src/libcore/unicode/unicode.py +++ b/src/libcore/unicode/unicode.py @@ -81,8 +81,8 @@ PREAMBLE = """\ #![allow(missing_docs, non_upper_case_globals, non_snake_case)] -use unicode::version::UnicodeVersion; -use unicode::bool_trie::{{BoolTrie, SmallBoolTrie}}; +use crate::unicode::version::UnicodeVersion; +use crate::unicode::bool_trie::{{BoolTrie, SmallBoolTrie}}; """.format(year=datetime.datetime.now().year) # Mapping taken from Table 12 from: |
