File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -243,14 +243,14 @@ impl CharRefTokenizer {
243
243
244
244
let ( c, error) = match self . num {
245
245
n if ( n > 0x10FFFF ) || self . num_too_big => ( '\u{fffd}' , true ) ,
246
- 0x00 | 0xD800 ... 0xDFFF => ( '\u{fffd}' , true ) ,
246
+ 0x00 | 0xD800 ..= 0xDFFF => ( '\u{fffd}' , true ) ,
247
247
248
- 0x80 ... 0x9F => match data:: C1_REPLACEMENTS [ ( self . num - 0x80 ) as usize ] {
248
+ 0x80 ..= 0x9F => match data:: C1_REPLACEMENTS [ ( self . num - 0x80 ) as usize ] {
249
249
Some ( c) => ( c, true ) ,
250
250
None => ( conv ( self . num ) , true ) ,
251
251
} ,
252
252
253
- 0x01 ... 0x08 | 0x0B | 0x0D ... 0x1F | 0x7F | 0xFDD0 ... 0xFDEF => ( conv ( self . num ) , true ) ,
253
+ 0x01 ..= 0x08 | 0x0B | 0x0D ..= 0x1F | 0x7F | 0xFDD0 ..= 0xFDEF => ( conv ( self . num ) , true ) ,
254
254
255
255
n if ( n & 0xFFFE ) == 0xFFFE => ( conv ( n) , true ) ,
256
256
Original file line number Diff line number Diff line change @@ -247,7 +247,7 @@ impl<Sink: TokenSink> XmlTokenizer<Sink> {
247
247
// Exclude forbidden Unicode characters
248
248
if self . opts . exact_errors &&
249
249
match c as u32 {
250
- 0x01 ... 0x08 | 0x0B | 0x0E ... 0x1F | 0x7F ... 0x9F | 0xFDD0 ... 0xFDEF => true ,
250
+ 0x01 ..= 0x08 | 0x0B | 0x0E ..= 0x1F | 0x7F ..= 0x9F | 0xFDD0 ..= 0xFDEF => true ,
251
251
n if ( n & 0xFFFE ) == 0xFFFE => true ,
252
252
_ => false ,
253
253
}
Original file line number Diff line number Diff line change 9
9
10
10
/// Is the character an ASCII alphanumeric character?
11
11
pub fn is_ascii_alnum ( c : char ) -> bool {
12
- matches ! ( c, '0' ... '9' | 'a' ... 'z' | 'A' ... 'Z' )
12
+ matches ! ( c, '0' ..= '9' | 'a' ..= 'z' | 'A' ..= 'Z' )
13
13
}
14
14
15
15
#[ cfg( test) ]
You can’t perform that action at this time.
0 commit comments