File tree Expand file tree Collapse file tree 1 file changed +7
-34
lines changed
src/tools/unicode-table-generator/src Expand file tree Collapse file tree 1 file changed +7
-34
lines changed Original file line number Diff line number Diff line change @@ -68,10 +68,7 @@ impl RawEmitter {
6868 assert ! ( inserted) ;
6969 }
7070
71- writeln ! (
72- & mut self . file,
73- "use super::ShortOffsetRunHeader;\n "
74- ) . unwrap ( ) ;
71+ writeln ! ( & mut self . file, "use super::ShortOffsetRunHeader;\n " ) . unwrap ( ) ;
7572 writeln ! (
7673 & mut self . file,
7774 "static SHORT_OFFSET_RUNS: [ShortOffsetRunHeader; {}] = [{}];" ,
@@ -111,46 +108,22 @@ impl RawEmitter {
111108 } else {
112109 writeln ! ( & mut self . file, "pub fn lookup(c: char) -> bool {{" ) . unwrap ( ) ;
113110 }
114- writeln ! (
115- & mut self . file,
116- " const {{" ,
117- )
118- . unwrap ( ) ;
111+ writeln ! ( & mut self . file, " const {{" ) . unwrap ( ) ;
119112 writeln ! (
120113 & mut self . file,
121114 " assert!(SHORT_OFFSET_RUNS.last().unwrap().0 > (char::MAX as u32));" ,
122115 )
123116 . 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 ( ) ;
134119 writeln ! (
135120 & mut self . file,
136121 " assert!(SHORT_OFFSET_RUNS[i].start_index() < OFFSETS.len());" ,
137122 )
138123 . 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 ( ) ;
154127 writeln ! (
155128 & mut self . file,
156129 " // 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