@@ -239,6 +239,11 @@ fn main() {
239239 std:: fs:: write ( & path, generate_tests ( & write_location, ranges_by_property) ) . unwrap ( ) ;
240240 }
241241
242+ let mut table_file = String :: new ( ) ;
243+ table_file. push_str (
244+ "///! This file is generated by `./x run src/tools/unicode-table-generator`; do not edit manually!\n " ,
245+ ) ;
246+
242247 let mut total_bytes = 0 ;
243248 let mut modules = Vec :: new ( ) ;
244249 for ( property, ranges) in ranges_by_property {
@@ -252,24 +257,19 @@ fn main() {
252257 }
253258
254259 modules. push ( ( property. to_lowercase ( ) . to_string ( ) , emitter. file ) ) ;
255- println ! (
256- "{:15 }: {} bytes, {} codepoints in {} ranges ({ } - { }) using {}" ,
260+ table_file . push_str ( & format ! (
261+ "// {:16 }: {:5 } bytes, {:6 } codepoints in {:3 } ranges (U+{:06X } - U+{:06X }) using {}\n " ,
257262 property,
258263 emitter. bytes_used,
259264 datapoints,
260265 ranges. len( ) ,
261266 ranges. first( ) . unwrap( ) . start,
262267 ranges. last( ) . unwrap( ) . end,
263268 emitter. desc,
264- ) ;
269+ ) ) ;
265270 total_bytes += emitter. bytes_used ;
266271 }
267-
268- let mut table_file = String :: new ( ) ;
269-
270- table_file. push_str (
271- "///! This file is generated by `./x run src/tools/unicode-table-generator`; do not edit manually!\n " ,
272- ) ;
272+ table_file. push_str ( & format ! ( "// {:16}: {:5} bytes\n " , "Total" , total_bytes) ) ;
273273
274274 // Include the range search function
275275 table_file. push ( '\n' ) ;
@@ -296,8 +296,6 @@ fn main() {
296296 }
297297
298298 std:: fs:: write ( & write_location, format ! ( "{}\n " , table_file. trim_end( ) ) ) . unwrap ( ) ;
299-
300- println ! ( "Total table sizes: {total_bytes} bytes" ) ;
301299}
302300
303301fn version ( ) -> String {
0 commit comments