Skip to content

Commit 7a67409

Browse files
authored
Merge pull request #58 from luser/inclusive-ranges
Fix warnings about deprecated inclusive range syntax
2 parents 2cbbb1a + 3cfa8cd commit 7a67409

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ impl<'a> ParserState<'a> {
551551

552552
if let Ok(c) = self.get() {
553553
let symbol_type = match c {
554-
b'0'...b'4' => {
554+
b'0'..=b'4' => {
555555
// Read a variable.
556556
let kind = match c {
557557
b'0' => VarStorageKind::PrivateStatic,
@@ -719,13 +719,13 @@ impl<'a> ParserState<'a> {
719719
for _i in 0..bytes {
720720
let c = self.get()?;
721721
let byte: u8 = match c {
722-
b'0'...b'9' | b'a'...b'z' | b'A'...b'Z' | b'_' | b'$' => c,
722+
b'0'..=b'9' | b'a'..=b'z' | b'A'..=b'Z' | b'_' | b'$' => c,
723723
b'?' => {
724724
let c = self.get()?;
725725
match c {
726-
b'A'...b'Z' => c - b'A' + 0xe1,
727-
b'a'...b'z' => c - b'A' + 0xc1,
728-
b'0'...b'9' => {
726+
b'A'..=b'Z' => c - b'A' + 0xe1,
727+
b'a'..=b'z' => c - b'A' + 0xc1,
728+
b'0'..=b'9' => {
729729
let v = &[
730730
b',', b'/', b'\\', b':', b'.', b' ', b'\n', b'\t', b'\'', b'-',
731731
];
@@ -784,7 +784,7 @@ impl<'a> ParserState<'a> {
784784
self.advance(i + 1);
785785
return Ok(if neg { -(ret as i32) } else { ret as i32 });
786786
}
787-
b'A'...b'P' => {
787+
b'A'..=b'P' => {
788788
ret = (ret << 4) + i32::from(c - b'A');
789789
i += 1;
790790
}

0 commit comments

Comments
 (0)