File tree 1 file changed +7
-34
lines changed
src/tools/unicode-table-generator/src
1 file changed +7
-34
lines changed Original file line number Diff line number Diff line change @@ -68,10 +68,7 @@ impl RawEmitter {
68
68
assert ! ( inserted) ;
69
69
}
70
70
71
- writeln ! (
72
- & mut self . file,
73
- "use super::ShortOffsetRunHeader;\n "
74
- ) . unwrap ( ) ;
71
+ writeln ! ( & mut self . file, "use super::ShortOffsetRunHeader;\n " ) . unwrap ( ) ;
75
72
writeln ! (
76
73
& mut self . file,
77
74
"static SHORT_OFFSET_RUNS: [ShortOffsetRunHeader; {}] = [{}];" ,
@@ -111,46 +108,22 @@ impl RawEmitter {
111
108
} else {
112
109
writeln ! ( & mut self . file, "pub fn lookup(c: char) -> bool {{" ) . unwrap ( ) ;
113
110
}
114
- writeln ! (
115
- & mut self . file,
116
- " const {{" ,
117
- )
118
- . unwrap ( ) ;
111
+ writeln ! ( & mut self . file, " const {{" ) . unwrap ( ) ;
119
112
writeln ! (
120
113
& mut self . file,
121
114
" assert!(SHORT_OFFSET_RUNS.last().unwrap().0 > (char::MAX as u32));" ,
122
115
)
123
116
. unwrap ( ) ;
124
- writeln ! (
125
- & mut self . file,
126
- " let mut i = 0;" ,
127
- )
128
- . unwrap ( ) ;
129
- writeln ! (
130
- & mut self . file,
131
- " while i < SHORT_OFFSET_RUNS.len() {{" ,
132
- )
133
- . unwrap ( ) ;
117
+ writeln ! ( & mut self . file, " let mut i = 0;" ) . unwrap ( ) ;
118
+ writeln ! ( & mut self . file, " while i < SHORT_OFFSET_RUNS.len() {{" ) . unwrap ( ) ;
134
119
writeln ! (
135
120
& mut self . file,
136
121
" assert!(SHORT_OFFSET_RUNS[i].start_index() < OFFSETS.len());" ,
137
122
)
138
123
. unwrap ( ) ;
139
- writeln ! (
140
- & mut self . file,
141
- " i += 1;" ,
142
- )
143
- . unwrap ( ) ;
144
- writeln ! (
145
- & mut self . file,
146
- " }}" ,
147
- )
148
- . unwrap ( ) ;
149
- writeln ! (
150
- & mut self . file,
151
- " }}" ,
152
- )
153
- . unwrap ( ) ;
124
+ writeln ! ( & mut self . file, " i += 1;" ) . unwrap ( ) ;
125
+ writeln ! ( & mut self . file, " }}" ) . unwrap ( ) ;
126
+ writeln ! ( & mut self . file, " }}" ) . unwrap ( ) ;
154
127
writeln ! (
155
128
& mut self . file,
156
129
" // SAFETY: We just ensured the last element of `SHORT_OFFSET_RUNS` is greater than `std::char::MAX`" ,
You can’t perform that action at this time.
0 commit comments