File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -222,20 +222,20 @@ fn cmd_utf8_ranges(args: &Args) -> Result<()> {
222222 format ! ( "unexpected HIR, expected Unicode class" ) . into ( ) ,
223223 ) ,
224224 } ;
225+ let mut char_count = 0 ;
225226 for ( i, range) in cls. iter ( ) . enumerate ( ) {
226227 if i > 0 {
227228 println ! ( "----------------------------" ) ;
228229 }
230+ char_count += ( range. end ( ) as u32 ) - ( range. start ( ) as u32 ) + 1 ;
229231 for seq in Utf8Sequences :: new ( range. start ( ) , range. end ( ) ) {
230- for ( i, utf8_range) in seq. into_iter ( ) . enumerate ( ) {
231- if i > 0 {
232- print ! ( "|" ) ;
233- }
232+ for utf8_range in seq. into_iter ( ) {
234233 print ! ( "[{:02X}-{:02X}]" , utf8_range. start, utf8_range. end) ;
235234 }
236235 println ! ( ) ;
237236 }
238237 }
238+ println ! ( "codepoint count: {}" , char_count) ;
239239 Ok ( ( ) )
240240}
241241
You can’t perform that action at this time.
0 commit comments