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 {
244
244
245
245
let ( c, error) = match self . num {
246
246
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 ) ,
248
248
249
- 0x80 ... 0x9F => match data:: C1_REPLACEMENTS [ ( self . num - 0x80 ) as usize ] {
249
+ 0x80 ..= 0x9F => match data:: C1_REPLACEMENTS [ ( self . num - 0x80 ) as usize ] {
250
250
Some ( c) => ( c, true ) ,
251
251
None => ( conv ( self . num ) , true ) ,
252
252
} ,
253
253
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 ) ,
255
255
256
256
n if ( n & 0xFFFE ) == 0xFFFE => ( conv ( n) , true ) ,
257
257
Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ impl<Sink: TokenSink> Tokenizer<Sink> {
264
264
265
265
if self . opts . exact_errors &&
266
266
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 ,
268
268
n if ( n & 0xFFFE ) == 0xFFFE => true ,
269
269
_ => false ,
270
270
}
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 {
19
19
/// letter, otherwise None.
20
20
pub fn lower_ascii_letter ( c : char ) -> Option < char > {
21
21
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 ) ,
24
24
_ => None ,
25
25
}
26
26
}
27
27
28
28
/// Is the character an ASCII alphanumeric character?
29
29
pub 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' )
31
31
}
32
32
33
33
/// ASCII whitespace characters, as defined by
You can’t perform that action at this time.
0 commit comments