File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -244,14 +244,14 @@ impl CharRefTokenizer {
244244
245245 let ( c, error) = match self . num {
246246 n if ( n > 0x10FFFF ) || self . num_too_big => ( '\u{fffd}' , true ) ,
247- 0x00 | 0xD800 ... 0xDFFF => ( '\u{fffd}' , true ) ,
247+ 0x00 | 0xD800 ..= 0xDFFF => ( '\u{fffd}' , true ) ,
248248
249- 0x80 ... 0x9F => match data:: C1_REPLACEMENTS [ ( self . num - 0x80 ) as usize ] {
249+ 0x80 ..= 0x9F => match data:: C1_REPLACEMENTS [ ( self . num - 0x80 ) as usize ] {
250250 Some ( c) => ( c, true ) ,
251251 None => ( conv ( self . num ) , true ) ,
252252 } ,
253253
254- 0x01 ... 0x08 | 0x0B | 0x0D ... 0x1F | 0x7F | 0xFDD0 ... 0xFDEF => ( conv ( self . num ) , true ) ,
254+ 0x01 ..= 0x08 | 0x0B | 0x0D ..= 0x1F | 0x7F | 0xFDD0 ..= 0xFDEF => ( conv ( self . num ) , true ) ,
255255
256256 n if ( n & 0xFFFE ) == 0xFFFE => ( conv ( n) , true ) ,
257257
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ impl<Sink: TokenSink> Tokenizer<Sink> {
264264
265265 if self . opts . exact_errors &&
266266 match c as u32 {
267- 0x01 ... 0x08 | 0x0B | 0x0E ... 0x1F | 0x7F ... 0x9F | 0xFDD0 ... 0xFDEF => true ,
267+ 0x01 ..= 0x08 | 0x0B | 0x0E ..= 0x1F | 0x7F ..= 0x9F | 0xFDD0 ..= 0xFDEF => true ,
268268 n if ( n & 0xFFFE ) == 0xFFFE => true ,
269269 _ => false ,
270270 }
Original file line number Diff line number Diff line change @@ -19,15 +19,15 @@ pub fn to_escaped_string<T: fmt::Debug>(x: &T) -> String {
1919/// letter, otherwise None.
2020pub fn lower_ascii_letter ( c : char ) -> Option < char > {
2121 match c {
22- 'a' ... 'z' => Some ( c) ,
23- 'A' ... 'Z' => Some ( ( c as u8 - b'A' + b'a' ) as char ) ,
22+ 'a' ..= 'z' => Some ( c) ,
23+ 'A' ..= 'Z' => Some ( ( c as u8 - b'A' + b'a' ) as char ) ,
2424 _ => None ,
2525 }
2626}
2727
2828/// Is the character an ASCII alphanumeric character?
2929pub fn is_ascii_alnum ( c : char ) -> bool {
30- matches ! ( c, '0' ... '9' | 'a' ... 'z' | 'A' ... 'Z' )
30+ matches ! ( c, '0' ..= '9' | 'a' ..= 'z' | 'A' ..= 'Z' )
3131}
3232
3333/// ASCII whitespace characters, as defined by
You can’t perform that action at this time.
0 commit comments