Skip to content

Commit

Permalink
Merge pull request #29 from mjguynn/master
Browse files Browse the repository at this point in the history
Change tables from const to static
  • Loading branch information
Manishearth authored Jul 24, 2022
2 parents 458f6ac + 20050c6 commit c9f8c46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def emit_module(
module.write(
f"""
/// Autogenerated. {subtable_count} sub-table(s). Consult [`lookup_width`] for layout info.
const TABLES_{i}: [u8; {len(byte_array)}] = ["""
static TABLES_{i}: [u8; {len(byte_array)}] = ["""
)
for (j, byte) in enumerate(byte_array):
# Add line breaks for every 15th entry (chosen to match what rustfmt does)
Expand Down
6 changes: 3 additions & 3 deletions src/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub mod charwidth {
}

/// Autogenerated. 1 sub-table(s). Consult [`lookup_width`] for layout info.
const TABLES_0: [u8; 256] = [
static TABLES_0: [u8; 256] = [
0x00, 0x01, 0x02, 0x03, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D,
0x0E, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x0F, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x0F, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09,
Expand All @@ -108,7 +108,7 @@ pub mod charwidth {
];

/// Autogenerated. 19 sub-table(s). Consult [`lookup_width`] for layout info.
const TABLES_1: [u8; 2432] = [
static TABLES_1: [u8; 2432] = [
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x06, 0x08, 0x06, 0x09, 0x0A, 0x0B, 0x0C,
0x0D, 0x0E, 0x0F, 0x10, 0x06, 0x06, 0x06, 0x11, 0x12, 0x13, 0x14, 0x06, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x22, 0x24, 0x25,
Expand Down Expand Up @@ -275,7 +275,7 @@ pub mod charwidth {
];

/// Autogenerated. 240 sub-table(s). Consult [`lookup_width`] for layout info.
const TABLES_2: [u8; 3840] = [
static TABLES_2: [u8; 3840] = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
0x55, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5D, 0xD7, 0x77, 0x75, 0xFF,
Expand Down

0 comments on commit c9f8c46

Please sign in to comment.