Skip to content

Commit 59758c5

Browse files
committed
Adopt ..= range syntax in xml5ever
This is starts to become a warning in rustc 1.37.0
1 parent 284953e commit 59758c5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

xml5ever/src/tokenizer/char_ref/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,14 @@ impl CharRefTokenizer {
243243

244244
let (c, error) = match self.num {
245245
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),
247247

248-
0x80...0x9F => match data::C1_REPLACEMENTS[(self.num - 0x80) as usize] {
248+
0x80..=0x9F => match data::C1_REPLACEMENTS[(self.num - 0x80) as usize] {
249249
Some(c) => (c, true),
250250
None => (conv(self.num), true),
251251
},
252252

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),
254254

255255
n if (n & 0xFFFE) == 0xFFFE => (conv(n), true),
256256

xml5ever/src/tokenizer/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ impl<Sink: TokenSink> XmlTokenizer<Sink> {
247247
// Exclude forbidden Unicode characters
248248
if self.opts.exact_errors &&
249249
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,
251251
n if (n & 0xFFFE) == 0xFFFE => true,
252252
_ => false,
253253
}

xml5ever/src/util/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
/// Is the character an ASCII alphanumeric character?
1111
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')
1313
}
1414

1515
#[cfg(test)]

0 commit comments

Comments
 (0)